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

[SanitizerBinaryMetadata] Fix multi-version sanitizer metadata #97848

Merged
merged 1 commit into from
Jul 8, 2024

Commits on Jul 4, 2024

  1. [SanitizerBinaryMetadata] Fix multi-version sanitizer metadata

    It should be valid to combine TUs that have different versions of
    sanitizer metadata. However, this had not been possible due to giving
    sanitizer metadata sections, constructors, and destructors (that call
    callbacks) the same name for different versions.
    
    This would then result in the linker attempting to merge sections that
    contain metadata of different versions, as well as picking any one of
    the constructors or destructors due to having the same COMDAT key. The
    end result is that consumers of this data would end up interpreting the
    metadata incorrectly.
    
    Although combining old and new versions is not recommended, more
    realistic is combining TUs that have been compiled with different target
    code models (which are also encoded in the sanitizer metadata version).
    
    To fix, and properly support multi-version sanitizer metadata, attach
    the version to section names and internal constructor and destructor
    names. The ABI remains unchanged.
    melver committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    8478cb8 View commit details
    Browse the repository at this point in the history