From 4a9fdb17f0d6de95080d7b00e6aa5973efdd9cfb Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Sat, 11 Apr 2026 20:28:19 +0300 Subject: [PATCH] build: cmake: fix -fno-sanitize-address-use-after-scope for CQL parser The CMake build had -fsanitize-address-use-after-scope (enable) when it should have been -fno-sanitize-address-use-after-scope (disable). The comment on lines 24-25 of cql3/CMakeLists.txt explains the intent: the use-after-scope sanitizer uses too much stack space on CqlParser and overflows the stack. The Python-ninja path in configure.py:2801-2802 correctly had -fno-sanitize-address-use-after-scope. Found by black-box comparison of compiler flags between the Python-ninja and CMake build paths (ninja -nv output, debug mode, CqlParser.o): Python-ninja: -fno-sanitize-address-use-after-scope (correct: disable) CMake: -fsanitize-address-use-after-scope (wrong: enable) Closes scylladb/scylladb#29439 --- cql3/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cql3/CMakeLists.txt b/cql3/CMakeLists.txt index b941ff4c7a..20bf0bbe21 100644 --- a/cql3/CMakeLists.txt +++ b/cql3/CMakeLists.txt @@ -23,7 +23,7 @@ set_property( $<$:-O1> # use-after-scope sanitizer also uses large amount of stack space # and overflows the stack of CqlParser - $<$:-fsanitize-address-use-after-scope>) + $<$:-fno-sanitize-address-use-after-scope>) add_library(cql3 STATIC) target_sources(cql3