RISC-V: Blacklist ffi_call_int for ASan and HWASan build 04/317304/1 accepted/tizen_base_x_asan tizen_base_v3.4.2 accepted/tizen/base/20241231.213727 accepted/tizen/base/toolchain/20250112.233351 accepted/tizen/base/x/20241231.213739 accepted/tizen/base/x/asan/20241230.164347
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 30 Dec 2024 06:28:23 +0000 (15:28 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 30 Dec 2024 06:29:40 +0000 (15:29 +0900)
The same dynamic-stack-buffer-overflow issues are reported from
riscv64 asan runtime. So, port the commit bdea00c1c77d to riscv also.

Ref: https://github.com/libffi/libffi/issues/255
Ref: https://git.tizen.org/cgit/platform/upstream/libffi/commit/?id=bdea00c1c77d
Ref: https://git.tizen.org/cgit/platform/upstream/libffi/commit/?id=77df4e341d83

Change-Id: Ib957b2369e6a287a3903d82f6589c26dbecf02ab
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
src/riscv/ffi.c

index c910858896ae60d38da2b992c4790932767a5e20..798f0aaebf98cb923f2f02f4dfede4a97afeee7f 100644 (file)
@@ -328,6 +328,9 @@ extern void ffi_call_asm (void *stack, struct call_context *regs,
                          void (*fn) (void), void *closure) FFI_HIDDEN;
 
 static void
+#if defined(__SANITIZE_ADDRESS__) || defined(__SANITIZE_HWADDRESS__)
+__attribute__((__noinline__,__no_sanitize_address__,__no_sanitize_hwaddress__))
+#endif
 ffi_call_int (ffi_cif *cif, void (*fn) (void), void *rvalue, void **avalue,
              void *closure)
 {