diff options
| author | Thomas Roos <throos@amazon.de> | 2025-01-22 13:44:07 +0100 |
|---|---|---|
| committer | Ross Burton <ross.burton@arm.com> | 2025-01-23 11:56:47 +0000 |
| commit | a58f8a087b8d60cdb3e072233fcc8abd81906c72 (patch) | |
| tree | 0be81bd06d0d837d89d32bff012bfb6d9996e917 | |
| parent | a58e99ce3a5724bec5490b61c48178bdbd4f2ebe (diff) | |
| download | poky-a58f8a087b8d60cdb3e072233fcc8abd81906c72.tar.gz | |
gcc-sanitizers.inc: Workaround for aarch64
When using the -fsanitize=address CXX_FLAG for a program compiled for
aarch64 / arm64
This is happing:
MemorySanitizer: CHECK failed: sanitizer_allocator_primary64.h:133 "((kSpaceBeg))
== ((address_range.Init(TotalSpaceSize, PrimaryAllocatorName, kSpaceBeg)))"
(0xe00000000000, 0xfffffffffffffff4) (tid=51745)
With -DSANITIZER_CAN_USE_ALLOCATOR64=0 this is not happening and
potenial bugs are detected.
ARM32 does not require this patch.
More info about the issue in this thread:
https://github.com/llvm/llvm-project/issues/65144
(From OE-Core rev: 12442b9b6df06317174066854935b1d6a4f1865d)
Signed-off-by: Thomas Roos <throos@amazon.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@arm.com>
| -rw-r--r-- | meta/recipes-devtools/gcc/gcc-sanitizers.inc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc index 4163e87e1f..6c81d30243 100644 --- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc +++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc | |||
| @@ -11,6 +11,10 @@ EXTRA_OECONF_PATHS = "\ | |||
| 11 | --with-build-sysroot=${STAGING_DIR_TARGET} \ | 11 | --with-build-sysroot=${STAGING_DIR_TARGET} \ |
| 12 | " | 12 | " |
| 13 | 13 | ||
| 14 | # Workaround for this issue: https://github.com/llvm/llvm-project/issues/65144 on aarch64 | ||
| 15 | # compiler-rt/sanitizers/aarch64: CHECK failed: sanitizer_allocator_primary64.h:133 | ||
| 16 | CXXFLAGS:append:aarch64 = " -DSANITIZER_CAN_USE_ALLOCATOR64=0" | ||
| 17 | |||
| 14 | do_configure () { | 18 | do_configure () { |
| 15 | rm -rf ${B}/${TARGET_SYS}/libsanitizer/ | 19 | rm -rf ${B}/${TARGET_SYS}/libsanitizer/ |
| 16 | mkdir -p ${B}/${TARGET_SYS}/libsanitizer/ | 20 | mkdir -p ${B}/${TARGET_SYS}/libsanitizer/ |
