1
0
Fork 0
forked from nuttx/nuttx-update

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
   // https://github.com/google/sanitizers/issues/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>
This commit is contained in:
yinshengkai 2024-05-15 17:36:32 +08:00 committed by Xiang Xiao
parent 0111cb73f1
commit 53ddc3ef7f

View file

@ -108,6 +108,11 @@ static void allsyms_relocate(void)
****************************************************************************/
#ifdef CONFIG_SIM_ASAN
const char *__asan_default_suppressions(void)
{
return "interceptor_via_lib:libasan.so";
}
const char *__asan_default_options(void)
{
return "abort_on_error=1"