| Summary: | Deadlock in SDL SIGINT and SIGTERM handling | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Magnus Bjerke Vik <mbvett> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | mbvett |
| Version: | 2.0.3 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: |
Backtrace for deadlock
Code to reproduce deadlock |
||
Created attachment 2024 [details]
Code to reproduce deadlock
You might have to run the program a few times so that the signal is received while in a malloc routine. You can also increase the numAllocs.
This is fixed now in https://hg.libsdl.org/SDL/rev/fd60d77139fc, thanks! --ryan. |
Created attachment 2023 [details] Backtrace for deadlock Receiving a SIGINT or SIGTERM while already inside malloc routines will cause the program to deadlock. I've attached a backtrace from a case where the signal is received while freeing some allocated data. I've also attached a simple program to reproduce the problem. It might have to be run a few times to ensure that the signal is received while in a malloc routine. I've only tested this on Linux, yet. A simple workaround is to handle the signals yourself and avoid any malloc routines.