[all-commits] [llvm/llvm-project] f5b9e1: [SanitizerBinaryMetadata] Fix multi-version saniti...
Marco Elver via All-commits
all-commits at lists.llvm.org
Mon Jul 8 08:07:22 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f5b9e11eb8ada0e7cc292f9ecd29a220d1265084
https://github.com/llvm/llvm-project/commit/f5b9e11eb8ada0e7cc292f9ecd29a220d1265084
Author: Marco Elver <elver at google.com>
Date: 2024-07-08 (Mon, 08 Jul 2024)
Changed paths:
M clang/test/CodeGen/sanitize-metadata-ignorelist.c
M clang/test/CodeGen/sanitize-metadata-nosanitize.c
M clang/test/CodeGen/sanitize-metadata.c
M llvm/lib/Transforms/Instrumentation/SanitizerBinaryMetadata.cpp
M llvm/test/Instrumentation/SanitizerBinaryMetadata/atomics.ll
M llvm/test/Instrumentation/SanitizerBinaryMetadata/ctor.ll
Log Message:
-----------
[SanitizerBinaryMetadata] Fix multi-version sanitizer metadata (#97848)
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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list