8000 Use noinline version of accessing current ec · github/ruby@a87ae24 · GitHub
[go: up one dir, main page]

Skip to content

Commit a87ae24

Browse files
committed
Use noinline version of accessing current ec
On universal.arm64e-darwin22 with clang 15.0.0 (I didn't check details yet) accessing `ruby_current_ec` directly causes assertion violation `VM_ASSERT(ec == rb_current_ec_noinline())` on `rb_current_execution_context()`, maybe because TLS accessing issue.
1 parent 541371e commit a87ae24

File tree

1 file changed

+1
- file changed
+1
-1
lines changed

thread_pthread.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ struct rb_thread_sched {
134134

135135
# ifdef __APPLE__
136136
// on Darwin, TLS can not be accessed across .so
137-
struct rb_execution_context_struct *rb_current_ec(void);
137+
NOINLINE(struct rb_execution_context_struct *rb_current_ec(void));
138138
# else
139139
RUBY_EXTERN RB_THREAD_LOCAL_SPECIFIER struct rb_execution_context_struct *ruby_current_ec;
140140

0 commit comments

Comments
 (0)
0