Disable ASAN in ffi_call_int functions 66/319866/1 accepted/tizen_base accepted/tizen_base_toolchain accepted/tizen_base_x tizen_base accepted/tizen/base/20250224.033227 accepted/tizen/base/toolchain/20250227.033046 accepted/tizen/base/x/20250224.083703 accepted/tizen/base/x/20250225.074823
authorDongkyun Son <dongkyun.s@samsung.com>
Wed, 19 Feb 2025 03:12:19 +0000 (12:12 +0900)
committerDongkyun Son <dongkyun.s@samsung.com>
Wed, 19 Feb 2025 03:32:22 +0000 (03:32 +0000)
Disabled ASAN in ffi_call_int on arm and riscv to prevent
dynamic-stack-buffer-overflow

Ref: https://github.com/libffi/libffi/pull/858
Ref: https://archive.tizen.org/gerrit/#/c/platform/upstream/libffi/+/263835/
Ref: https://archive.tizen.org/gerrit/#/c/platform/upstream/libffi/+/315515/
Ref: https://review.tizen.org/gerrit/c/platform/upstream/libffi/+/317304

Change-Id: I6c526415cbcb7d95dfdfde8115086a6494ab8338
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
src/arm/ffi.c
src/riscv/ffi.c

index cfd3e9d19ebd4bbb497e2efb8913083a8dfc1394..5df0e7208142d808dcd8ebcd20238a1ae141c4d9 100644 (file)
@@ -361,6 +361,7 @@ extern void ffi_call_SYSV (void *stack, struct call_frame *,
 extern void ffi_call_VFP (void *vfp_space, struct call_frame *,
                           void (*fn) (void), unsigned vfp_used) FFI_HIDDEN;
 
+FFI_ASAN_NO_SANITIZE
 static void
 ffi_call_int (ffi_cif * cif, void (*fn) (void), void *rvalue,
              void **avalue, void *closure)
index b455b12ae75ca516f5b2d5ad4aecf85c0448589b..83135e2d742a15c325daf602c0effe4b14211e20 100644 (file)
@@ -330,6 +330,7 @@ ffi_status ffi_prep_cif_machdep_var(ffi_cif *cif, unsigned int nfixedargs, unsig
 extern void ffi_call_asm (void *stack, struct call_context *regs,
                          void (*fn) (void), void *closure) FFI_HIDDEN;
 
+FFI_ASAN_NO_SANITIZE
 static void
 ffi_call_int (ffi_cif *cif, void (*fn) (void), void *rvalue, void **avalue,
              void *closure)