intel / intel/confidential-computing.sgx.sdk

SA_ONSTACK signal handler flag

Open
#97 4 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
2
Forks
3
PR merge metrics
No merged PRs in 30d

Description

It appears that `reg_sig_handler` from `psw/urts/linux/sig_handler.cpp` doesn't attempt to preserve `SA_ONSTACK` flag from originally installed signal handlers.

In particular, this seems to cause troubles with Go runtime, since it expects its signal handlers be called on the dedicated signal stack. Go [documentation](https://pkg.go.dev/os/signal#hdr-Go_programs_that_use_cgo_or_SWIG) states:

> If the non-Go code installs any signal handlers, it must use the SA_ONSTACK flag with sigaction. Failing to do so is likely to cause the program to crash if the signal is received. Go programs routinely run with a limited stack, and therefore set up an alternate signal stack.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.