A signal handler can alter ucontext_t to affect execution after
the signal returns. Check that the contents are initialized.
Restoring unitialized values in registers can't be good.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Do you expect some cleanup for this?
| compiler-rt/lib/msan/msan_interceptors.cpp | ||
|---|---|---|
| 999 | what if signal handler is not instrumented? | |
| compiler-rt/test/msan/Linux/signal_mcontext2.cpp | ||
| 2 | do we need -fsanitize-memory-track-origins=2 ? | |
| compiler-rt/lib/msan/msan_interceptors.cpp | ||
|---|---|---|
| 999 | Ah, uc then should stay OK after __msan_unpoison | |
| compiler-rt/lib/msan/msan_interceptors.cpp | ||
|---|---|---|
| 999 | I guess we will have a problem if uninstructed handler use memcpy interceptors | |
| compiler-rt/lib/msan/msan_interceptors.cpp | ||
|---|---|---|
| 999 | Are there any known precedents for uninstrumented handlers that call instrumented functions? | |
| compiler-rt/test/msan/Linux/signal_mcontext2.cpp | ||
| 2 | It will fail only under msan, so the "not %run" part is msan-specific. | |
what if signal handler is not instrumented?