mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-03 08:46:46 +00:00
Throwing exceptions from code sometime confuses ASAN, as it cannot keep track of stack frames. This change therefore adds a macro to skip instrumentation around the `Throw` function.
14 lines
464 B
C
14 lines
464 B
C
#pragma once
|
|
|
|
// Helper to disable ASan/HwASan for specific functions
|
|
/*
|
|
ASAN flags some false positives with sudden jumps in control flow, like
|
|
exceptions, or when encountering coroutine stack switches. This macro can be used to disable ASAN
|
|
intrumentation for specific functions.
|
|
*/
|
|
#if defined(__GNUC__) || defined(__clang__)
|
|
#define XRPL_NO_SANITIZE_ADDRESS __attribute__((no_sanitize("address", "hwaddress")))
|
|
#else
|
|
#define XRPL_NO_SANITIZE_ADDRESS
|
|
#endif
|