Descriptionbetter exclusion for stack traces
Instead of two synchronization systems (in_signal_handler, gMutex),
we can just use one. This simplifies the signal handler logic to:
- first thread through grabs the lock, prints what's running and a stack trace,
then exits
- all other threads just sit waiting on that lock until exit kills them
Previously I think all threads were racing to exit, which can kill the process
before the printing thread is done. That truncated the output, which is dumb.
Plus...
refactor slightly so that crash_handler() shows up at the top of the stack
trace rather than some odd name for a lambda inside setup_crash_handler().
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2051863002
Committed: https://skia.googlesource.com/skia/+/5b64dab5bcb1823d465be1833db1f716f9b903e5
Patch Set 1 #Patch Set 2 : fix windows #Patch Set 3 : refactor for clearer names in stack trace #Messages
Total messages: 17 (9 generated)
|