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.1xx-xcode15.1] [runtime] Fix memory leak with BlockLiteral descriptors. Fixes #20503. #20562

Commits on May 6, 2024

  1. [runtime] Fix memory leak with BlockLiteral descriptors. Fixes xamari…

    …n#20503.
    
    We're using two different functions to atomically decrement a reference count,
    the native `atomic_fetch_sub` and the managed `Interlocked.Decrement`.
    
    Unfortunately the return value is not the same: `atomic_fetch_sub` returns the
    original value before the subtraction, while `Interlocked.Decrement` returns
    the subtracted value, while our code assumed the functions behaved the same.
    This resulted in a memory leak, because we'd incorrectly expect `0` to be
    returned from `atomic_fetch_sub` when the reference count reaches zero, and
    thus not detect when the descriptor a block should be freed.
    
    The fix is to update the expected return value from `atomic_fetch_sub` to be
    `1` instead of `0`.
    
    Fixes xamarin#20503.
    rolfbjarne committed May 6, 2024
    Configuration menu
    Copy the full SHA
    a1cdcae View commit details
    Browse the repository at this point in the history

Commits on May 16, 2024

  1. Merge branch 'release/8.0.1xx-xcode15.1' into backport-pr-20556-relea…

    …se/8.0.1xx-xcode15.1-2024-05-06
    dalexsoto committed May 16, 2024
    Configuration menu
    Copy the full SHA
    5880669 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2024

  1. Merge branch 'release/8.0.1xx-xcode15.1' into backport-pr-20556-relea…

    …se/8.0.1xx-xcode15.1-2024-05-06
    rolfbjarne committed May 20, 2024
    Configuration menu
    Copy the full SHA
    db21a3e View commit details
    Browse the repository at this point in the history