зеркало из https://github.com/github/ruby.git
18573b8d05
Previously on builds with optimizations disabled, this could result in an out of bounds read. When we had all of: * built with -O0 * Leaf builtin * Primitive.mandatory_only * "no args builtin", called by vm_call_single_noarg_inline_builti * The stack is escaped to the heap via binding or a proc This is because mk_builtin_loader generated reads for all locals regardless of whether they were used and in the case we generated a mandatory_only iseq that would include more variables than were actually available. On optimized builds, the invalid accesses would be optimized away, and this also was often unnoticed as the invalid access would just hit another part of the stack unless it had been escaped to the heap. The fix here is imperfect, as this could have false positives, but since Primitive.cexpr! is only available within the cruby codebase itself that's probably fine as a proper fix would be much more challenging (the only false positives we found were in rjit.rb). Fixes [Bug #20178] Co-authored-by: Adam Hess <HParker@github.com> |
||
---|---|---|
.. | ||
pending.rb | ||
runner.rb | ||
test_attr.rb | ||
test_autoload.rb | ||
test_block.rb | ||
test_class.rb | ||
test_constant_cache.rb | ||
test_env.rb | ||
test_eval.rb | ||
test_exception.rb | ||
test_fiber.rb | ||
test_finalizer.rb | ||
test_flip.rb | ||
test_flow.rb | ||
test_fork.rb | ||
test_gc.rb | ||
test_insns.rb | ||
test_io.rb | ||
test_jump.rb | ||
test_literal.rb | ||
test_literal_suffix.rb | ||
test_load.rb | ||
test_marshal.rb | ||
test_massign.rb | ||
test_method.rb | ||
test_objectspace.rb | ||
test_proc.rb | ||
test_ractor.rb | ||
test_rjit.rb | ||
test_string.rb | ||
test_struct.rb | ||
test_syntax.rb | ||
test_thread.rb | ||
test_yjit.rb | ||
test_yjit_30k_ifelse.rb | ||
test_yjit_30k_methods.rb | ||
test_yjit_rust_port.rb |