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
This commit is contained in:
Avi Kivity
2026-04-11 20:28:19 +03:00
committed by Nadav Har'El
parent ebdfa10c8f
commit 4a9fdb17f0

View File

@@ -23,7 +23,7 @@ set_property(
$<$<CONFIG:${unoptimized_modes}>:-O1>
# use-after-scope sanitizer also uses large amount of stack space
# and overflows the stack of CqlParser
$<$<CONFIG:${sanitized_modes}>:-fsanitize-address-use-after-scope>)
$<$<CONFIG:${sanitized_modes}>:-fno-sanitize-address-use-after-scope>)
add_library(cql3 STATIC)
target_sources(cql3