summaryrefslogtreecommitdiff
path: root/test/ruby/test_integer.rb
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2023-01-10 11:11:10 -0500
committerGitHub <noreply@github.com>2023-01-10 11:11:10 -0500
commitaeddc19340c7116d48fac3080553fbb823857d16 (patch)
tree83c0f2f0bc35c231013634b523d45e28a4c109a7 /test/ruby/test_integer.rb
parent6a585dbd5a41d5a9e0a8e406fef133e89bafb832 (diff)
YJIT: Save PC and SP before calling leaf builtins (#7090)
Previously, we did not update `cfp->sp` before calling the C function of ISEQs marked with `Primitive.attr! "inline"` (leaf builtins). This caused the GC to miss temporary values on the stack in case the function allocates and triggers a GC run. Right now, there is only a few leaf builtins in numeric.rb on Integer methods such as `Integer#~`. Since these methods only allocate when operating on big numbers, we missed this issue. Fix by saving PC and SP before calling the functions -- our usual protocol for calling C functions that may allocate on the GC heap. [Bug #19316]
Notes
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
Diffstat (limited to 'test/ruby/test_integer.rb')
0 files changed, 0 insertions, 0 deletions