Skip to content

Conversation

@casperisfine
Copy link
Contributor

there are a few other callsites where these references are set but it's on struct autoload_const that are allocated on the stack.

cc @peterzhu2118

there are a few other callsites where these references are set
but it's on `struct autoload_const` that are allocated on the stack.
@casperisfine
Copy link
Contributor Author

  /Users/runner/work/ruby/ruby/build/ruby(rb_bug+0x6f) [0x103718b5a] ../src/error.c:798
  /Users/runner/work/ruby/ruby/build/ruby(gc_mark_ptr+0xe8) [0x103488028] ../src/gc.c:7106
  /Users/runner/work/ruby/ruby/build/ruby(autoload_const_mark+0x24) [0x103631df4] ../src/variable.c:2236

Hum, that seems legit.

@casperisfine
Copy link
Contributor Author

It seems tricky to add a write barrier here unfortunately.

From my understanding we're missing one in autoload_apply_constants -> autoload_const_set -> const_tbl_update.

We iterate over the autoload_data->constants linked list of struct autoload_const, and we'd need to have the VALUE autoload_const here instead.

Maybe one solution would be to store VALUEs in autoload_data->constants, but not sure if that's possible.

@casperisfine casperisfine mentioned this pull request Apr 3, 2023
40 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants