Skip to content

Commit

Permalink
thread: do not use fortify source
Browse files Browse the repository at this point in the history
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: scylladb#2344
  • Loading branch information
dotnwat authored and rockwotj committed Oct 28, 2024
1 parent 2d57e30 commit c27a32d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/thread.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// If _FORTIFY_SOURCE is defined than longjmp ends up using longjmp_chk
// which asserts that you're jumping to the same stack. However, here we
// are intentionally switching stacks when longjmp'ing, so undefine this
// option to always use normal longjmp.
#undef _FORTIFY_SOURCE
/*
* This file is open source software, licensed to you under the terms
* of the Apache License, Version 2.0 (the "License"). See the NOTICE file
Expand Down

0 comments on commit c27a32d

Please sign in to comment.