mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 22:41:07 +08:00
compiler.h: Add a new attribute nosanitize_undefined
This allow us to disable UBSan for particular function. Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
@@ -195,6 +195,10 @@
|
|||||||
|
|
||||||
# define nosanitize_address __attribute__ ((no_sanitize_address))
|
# define nosanitize_address __attribute__ ((no_sanitize_address))
|
||||||
|
|
||||||
|
/* The nosanitize_undefined attribute informs GCC don't sanitize it */
|
||||||
|
|
||||||
|
# define nosanitize_undefined __attribute__((no_sanitize("undefined")))
|
||||||
|
|
||||||
/* The nostackprotect_function attribute disables stack protection in
|
/* The nostackprotect_function attribute disables stack protection in
|
||||||
* sensitive functions, e.g., stack coloration routines.
|
* sensitive functions, e.g., stack coloration routines.
|
||||||
*/
|
*/
|
||||||
@@ -465,6 +469,7 @@
|
|||||||
# define noinline_function
|
# define noinline_function
|
||||||
# define noinstrument_function
|
# define noinstrument_function
|
||||||
# define nosanitize_address
|
# define nosanitize_address
|
||||||
|
# define nosanitize_undefined
|
||||||
# define nostackprotect_function
|
# define nostackprotect_function
|
||||||
|
|
||||||
# define unused_code
|
# define unused_code
|
||||||
@@ -597,6 +602,7 @@
|
|||||||
# define noinline_function
|
# define noinline_function
|
||||||
# define noinstrument_function
|
# define noinstrument_function
|
||||||
# define nosanitize_address
|
# define nosanitize_address
|
||||||
|
# define nosanitize_undefined
|
||||||
# define nostackprotect_function
|
# define nostackprotect_function
|
||||||
# define unused_code
|
# define unused_code
|
||||||
# define unused_data
|
# define unused_data
|
||||||
@@ -698,6 +704,7 @@
|
|||||||
# define noinline_function
|
# define noinline_function
|
||||||
# define noinstrument_function
|
# define noinstrument_function
|
||||||
# define nosanitize_address
|
# define nosanitize_address
|
||||||
|
# define nosanitize_undefined
|
||||||
# define nostackprotect_function
|
# define nostackprotect_function
|
||||||
# define unused_code
|
# define unused_code
|
||||||
# define unused_data
|
# define unused_data
|
||||||
@@ -765,6 +772,7 @@
|
|||||||
# define noinline_function
|
# define noinline_function
|
||||||
# define noinstrument_function
|
# define noinstrument_function
|
||||||
# define nosanitize_address
|
# define nosanitize_address
|
||||||
|
# define nosanitize_undefined
|
||||||
# define nostackprotect_function
|
# define nostackprotect_function
|
||||||
# define unused_code
|
# define unused_code
|
||||||
# define unused_data
|
# define unused_data
|
||||||
|
|||||||
Reference in New Issue
Block a user