Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: issues#303 #304

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions backward.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,10 @@
#endif
#endif // defined(BACKWARD_SYSTEM_DARWIN)

#include <mutex>
#if defined(BACKWARD_SYSTEM_WINDOWS)

#include <condition_variable>
#include <mutex>
#include <thread>

#include <basetsd.h>
Expand Down Expand Up @@ -4209,7 +4209,7 @@ class SignalHandling {
struct sigaction action;
memset(&action, 0, sizeof action);
action.sa_flags =
static_cast<int>(SA_SIGINFO | SA_ONSTACK | SA_NODEFER | SA_RESETHAND);
static_cast<int>(SA_SIGINFO | SA_ONSTACK | SA_NODEFER);
sigfillset(&action.sa_mask);
sigdelset(&action.sa_mask, posix_signals[i]);
#if defined(__clang__)
Expand Down Expand Up @@ -4287,16 +4287,16 @@ class SignalHandling {
private:
details::handle<char *> _stack_content;
bool _loaded;
static std::mutex _mu;

#ifdef __GNUC__
__attribute__((noreturn))
#endif
static void
sig_handler(int signo, siginfo_t *info, void *_ctx) {
std::lock_guard lk(_mu);
handleSignal(signo, info, _ctx);

// try to forward the signal.
raise(info->si_signo);

// terminate the process immediately.
puts("watf? exit");
Expand Down