mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 13:56:29 +00:00
![Nathan Froyd](/assets/img/avatar_default.png)
The profiler's signal handler clobbers errno, via its calls to sem_post, or via other functions that it transitively calls. TSan complains about this, as a sample arriving at the wrong time could make it look like a function that failed actually succeeded, or vice versa. Ensure that the signal handler preserves the state of the world by saving and restoring errno around its operation.