Interesting, a mysterious bug report I've been struggling to track down just got solved. It turns out, 32-bit getcontext() can return failure if run inside a docker container. Apparently the cause is the default docker seccomp policy doesn't allow sigprocmask() (wtf?). 
-
-
OK, fair enough. But if glibc's getcontext() is wrongly calling the old sigprocmask syscall, it can't be working right to begin with.
-
I just checked the source and indeed it is. This means it's leaving uninitialized junk in the upper 32 bits of the sigset_t, and this junk is possibly getting restored over the caller's signal mask later. Need to open a glibc bug for it.
- 4 more replies
New conversation -
-
-
If you do need an implementation that works in unpatched Docker, you might try https://github.com/kaniini/libucontext …. It's what ppl/distros use to get ucontext API on musl, and should be safe/compatible to use with glibc but I didn't check.
-
It doesn't save/restore the sigprocmask though. (Might be fine but YMMV.)
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
