[LTP] [PATCH] cve-2015-3290: build with O0

Chunyu Hu chuhu@redhat.com
Tue Nov 19 08:28:17 CET 2024


Hit a compile broken for this test in rhel10 gcc-14.2.1-6.el10.x86_64
and find only with O0 it could be compiled pass.

CC testcases/cve/cve-2014-0196
cve-2015-3290.c: In function ‘child_thread’:
cve-2015-3290.c:437:1: error: bp cannot be used in ‘asm’ here
  437 | }
      | ^
make: *** [../../include/mk/rules.mk:45: cve-2015-3290] Error 1

Signed-off-by: Chunyu Hu <chuhu@redhat.com>
---
 testcases/cve/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testcases/cve/Makefile b/testcases/cve/Makefile
index 01b9b9ccb..2a769dea8 100644
--- a/testcases/cve/Makefile
+++ b/testcases/cve/Makefile
@@ -22,6 +22,6 @@ ifneq (,$(filter $(HOST_CPU),x86 x86_64))
 meltdown: CFLAGS += -msse2
 endif
 
-cve-2015-3290:	CFLAGS += -pthread -fomit-frame-pointer
+cve-2015-3290:	CFLAGS += -pthread -fomit-frame-pointer -O0
 
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
-- 
2.47.0



More information about the ltp mailing list