Skip to content

Commit

Permalink
arch/sim: suppress libasan checks
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Gary-Hobson authored and xiaoxiang781216 committed Aug 23, 2024
1 parent 0111cb7 commit 53ddc3e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/sim/src/sim/sim_head.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 53ddc3e

Please sign in to comment.