diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-06-26 10:45:30 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-06-26 09:16:38 +0000 |
| commit | 9db41fc9f106c9f5d3fc096ec450af590ee87cdb (patch) | |
| tree | 4d4fc37f9d696f12c79ad35bb78fa5ed415a93ef /executor/executor_runner.h | |
| parent | dec8bc946df23a6f4d996bc1d478a1f4cbdc164b (diff) | |
executor: use mcontext_t only on linux
OpenBSD says:
executor/executor_runner.h:750:51: error: no member named 'uc_mcontext' in 'sigcontext'
auto& mctx = static_cast<ucontext_t*>(ucontext)->uc_mcontext;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
Diffstat (limited to 'executor/executor_runner.h')
| -rw-r--r-- | executor/executor_runner.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/executor/executor_runner.h b/executor/executor_runner.h index e0c4b1775..0076f3a86 100644 --- a/executor/executor_runner.h +++ b/executor/executor_runner.h @@ -747,10 +747,10 @@ static void SigchldHandler(int sig) static void SigsegvHandler(int sig, siginfo_t* info, void* ucontext) { // Print minimal debugging info we can extract reasonably easy. - auto& mctx = static_cast<ucontext_t*>(ucontext)->uc_mcontext; - (void)mctx; uintptr_t pc = 0xdeadbeef; #if GOOS_linux + auto& mctx = static_cast<ucontext_t*>(ucontext)->uc_mcontext; + (void)mctx; #if GOARCH_amd64 pc = mctx.gregs[REG_RIP]; #elif GOARCH_arm64 |
