1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/yjit
Alan Wu 39f7eddec4 YJIT: Fix gen_expandarray treating argument as VALUE
The expandarray instruction interpreters its arguments as rb_num_t.
YJIT was treating the num argument as a VALUE previously and when
it has a certain bit pattern, it can look like a GC pointer. The
argument is not a pointer, so YJIT crashed when trying to mark those
pointers.

This bug existed previously, but our test suite didn't expose it until
f55212bce9. TestArgf#test_to_io has a
line like:

    a1, a2, a3, a4, a5, a6, a7, a8 = array

Which maps to an expandarray with an argument of 8. Qnil happened to
be defined as 8, which masked the issue.

Fix it by not using the argument as a VALUE.
2022-10-20 18:12:15 -04:00
..
bindgen YJIT: incorporate ruby_special_consts 2022-10-20 15:43:34 -04:00
src YJIT: Fix gen_expandarray treating argument as VALUE 2022-10-20 18:12:15 -04:00
.gitignore
Cargo.lock
Cargo.toml YJIT: fold the "asm_comments" feature into "disasm" (#6591) 2022-10-19 14:03:07 -04:00
not_gmake.mk YJIT: Support MAKE=bmake for release build 2022-09-20 14:17:27 -04:00
yjit.mk YJIT: Support MAKE=bmake for release build 2022-09-20 14:17:27 -04:00