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

[hwasan] Fixing false invalid-free with disabled tagging #67169

Merged
merged 1 commit into from
Sep 22, 2023

Commits on Sep 22, 2023

  1. [hwasan] Fixing false invalid-free with disabled tagging

    This problem was accidentally discovered by the internal symbolizer, but
    it's relevant for external one as well, see the test.
    
    If we just disable tagging, there may still be tagged allocations that
    have already been freed. After disabling tagging, these tagged
    allocations can be released to the user as-is, which would later break
    the "invalid-free" check.
    
    We cannot just disable the "invalid-free" check with disabled tagging,
    because if we re-enable tagging, the issue still applies to allocations
    created when it was disabled.
    
    The fix is to continue tagging with zero even if tagging is disabled.
    
    This makes the "disabled" mode less efficient, but this is not the
    primary use case.
    vitalybuka committed Sep 22, 2023
    Configuration menu
    Copy the full SHA
    acb0073 View commit details
    Browse the repository at this point in the history