Skip to content

Commit 3f823f9

Browse files
W-M-Rxiaoxiang781216
authored andcommitted
kasantest: -fno-builtin is enabled by default
The strlen function called by kasantest will be optimized by the compiler, and the strlen function implemented in NX will not be called. Adding -fno-builtin can solve the problem. Signed-off-by: wangmingrong1 <[email protected]>
1 parent f34ae45 commit 3f823f9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

testing/mm/kasantest/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
if(CONFIG_TESTING_KASAN)
2424
set(CFLAGS
25+
-fno-builtin
2526
-Wno-error
2627
-Wno-use-after-free
2728
-Wno-array-bounds

testing/mm/kasantest/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@ STACKSIZE = $(CONFIG_TESTING_KASAN_STACKSIZE)
3232
CFLAGS += -Wno-error -Wno-use-after-free -Wno-stringop-overflow
3333
CFLAGS += -Wno-array-bounds -Wno-free-nonheap-object
3434
CFLAGS += -Wno-unused-value -Wno-unused-variable
35-
CFLAGS += "-O0"
35+
CFLAGS += -fno-builtin "-O0"
3636

3737
include $(APPDIR)/Application.mk

0 commit comments

Comments
 (0)