Skip to content

Commit c96444f

Browse files
dotnwatnyh
authored andcommittedOct 28, 2024·
thread: do not use fortify source
It causes problems with longjmp *** longjmp causes uninitialized stack frame ***: terminated Aborting on shard 0. Backtrace: which was taken care of in the cmake build, but needs to be fixed in our bazel build. reference: #2344 Closes #2522
1 parent 2d57e30 commit c96444f

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed
 

‎CMakeLists.txt

-4
Original file line numberDiff line numberDiff line change
@@ -780,10 +780,6 @@ add_library (seastar
780780
src/websocket/server.cc
781781
)
782782

783-
# We disable _FORTIFY_SOURCE because it generates false positives with longjmp() (src/core/thread.cc)
784-
set_source_files_properties(src/core/thread.cc
785-
PROPERTIES COMPILE_FLAGS -U_FORTIFY_SOURCE)
786-
787783
add_library (Seastar::seastar ALIAS seastar)
788784

789785
add_dependencies (seastar

‎src/core/thread.cc

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
// If _FORTIFY_SOURCE is defined then longjmp ends up using longjmp_chk
2+
// which asserts that you're jumping to the same stack. However, here we
3+
// are intentionally switching stacks when longjmp'ing, so undefine this
4+
// option to always use normal longjmp.
5+
#undef _FORTIFY_SOURCE
16
/*
27
* This file is open source software, licensed to you under the terms
38
* of the Apache License, Version 2.0 (the "License"). See the NOTICE file

0 commit comments

Comments
 (0)
Please sign in to comment.