Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix possible access to fromspace when autoboxing return values #1624

Merged
merged 1 commit into from Dec 22, 2021

Commits on Dec 20, 2021

  1. Fix possible access to fromspace when autoboxing return values

    If the target frame (e.g. tc->cur_frame) is a heap frame that lives in the
    nursery, the return value is a native value (e.g. return_i or a native call),
    the caller expects an object and boxing happens to trigger a GC run, the
    target frame could be moved before we dereference the target pointer to get
    the return_value register. This would lead to a segfault with GC_DEBUG 3.
    
    Fix by dereferencing target first instead of having the autobox(_int) macros
    doing it after boxing.
    
    Fixes GH #1621
    niner committed Dec 20, 2021
    Configuration menu
    Copy the full SHA
    f0e4b08 View commit details
    Browse the repository at this point in the history