Skip to content

Commit

Permalink
cmake: undefine _FORTIFY_SOURCE on thread.cc
Browse files Browse the repository at this point in the history
By undefining this as a public compile definition, it leaks into
everything that depends on Seastar, but appears to only be needed by
thread.cc which uses longjmp.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
  • Loading branch information
dotnwat committed Jul 10, 2024
1 parent 7fcc990 commit 1854c43
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,10 @@ add_library (seastar
src/websocket/server.cc
)

# We disable _FORTIFY_SOURCE because it generates false positives with longjmp() (src/core/thread.cc)
set_source_files_properties(src/core/thread.cc
PROPERTIES COMPILE_FLAGS -U_FORTIFY_SOURCE)

add_library (Seastar::seastar ALIAS seastar)

add_dependencies (seastar
Expand Down Expand Up @@ -898,12 +902,6 @@ include (CTest)
#
# To disable -Werror, pass -Wno-error to Seastar_CXX_FLAGS.
#
# We disable _FORTIFY_SOURCE because it generates false positives with longjmp() (src/core/thread.cc)
#

target_compile_options (seastar
PUBLIC
-U_FORTIFY_SOURCE)

target_compile_definitions(seastar
PUBLIC
Expand Down

0 comments on commit 1854c43

Please sign in to comment.