Skip to content

Commit 53ddc3e

Browse files
Gary-Hobsonxiaoxiang781216
authored andcommitted
arch/sim: suppress libasan checks
There is a false positive in asan of gcc-13, we need to mask it to ensure that other parts work properly sanitizer_common/sanitizer_common_interceptors.inc: // FIXME: under ASan the call below may write to freed memory and corrupt // its metadata. See // google/sanitizers#321. ==572161==ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address 0xed3d3f00 at pc 0xef46af64 bp 0xed3d3de8 sp 0xed3d39bc WRITE of size 128 at 0xed3d3f00 thread T0 #0 0xef46af63 in __interceptor_pthread_sigmask ../../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:4419 #1 0x5486aa7d in up_irq_save sim/posix/sim_hostirq.c:97 Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
1 parent 0111cb7 commit 53ddc3e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

arch/sim/src/sim/sim_head.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ static void allsyms_relocate(void)
108108
****************************************************************************/
109109

110110
#ifdef CONFIG_SIM_ASAN
111+
const char *__asan_default_suppressions(void)
112+
{
113+
return "interceptor_via_lib:libasan.so";
114+
}
115+
111116
const char *__asan_default_options(void)
112117
{
113118
return "abort_on_error=1"

0 commit comments

Comments
 (0)