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

[release/8.0] JIT: Disallow mismatched GC-ness for physical promotions #90739

Merged
merged 2 commits into from
Aug 17, 2023

Commits on Aug 17, 2023

  1. JIT: Disallow mismatched GC-ness for physical promotions

    Physical promotion was working under the assumption that reinterpreting
    GC pointers is undefined behavior, and would happily promote GC pointers
    as integers if it saw such accesses. However, physical promotion is
    function wide while the UB accesses can be happening in a restricted
    (dynamically unreachable) scope. This exact situation happens in
    MemoryExtensions.Contains. The issue was uncovered under jit stress
    where we did not fold away the guard early enough, meaning that
    promotion then saw a `TYP_LONG` access of a `struct { object, int }` and
    proceeded to promote it as such.
    
    Fix #90602
    jakobbotsch authored and github-actions committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    62946ee View commit details
    Browse the repository at this point in the history
  2. Address feedback

    jakobbotsch authored and github-actions committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    ada908f View commit details
    Browse the repository at this point in the history