This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 53ddc3ef7f0a66f392e085c9c7ae032fd70c9abe
Author: yinshengkai <[email protected]>
AuthorDate: Wed May 15 17:36:32 2024 +0800

    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 <[email protected]>
---
 arch/sim/src/sim/sim_head.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/sim/src/sim/sim_head.c b/arch/sim/src/sim/sim_head.c
index e2c3af1934..ea2b8016fd 100644
--- a/arch/sim/src/sim/sim_head.c
+++ b/arch/sim/src/sim/sim_head.c
@@ -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"

Reply via email to