mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
8c54dbd6c0
When a first hang is detected, the BHMgr Monitor thread needs to commit 5 more pages of stack to run profiler_suspend_and_sample_thread, which contains big stack variables. If that occurs while we are low on memory, failure to commit stack pages can crash the process. In bug 1716727, we have added delays on failed allocations to try to avoid crashing the main process under low memory condition. These delays could trigger the background hang monitor, which could in turn crash the process, as they occur in a low memory condition where we will likely fail to commit. We can pre-commit the 5 pages of stack at thread initialization to ensure that they will already be commited when we later need them. Or at least, we can try to see if that works. We do that with a wrapper for the __chkstk function. We add a new test in the NativeNt cppunit test, to ensure that our wrapper function behaves as expected. Differential Revision: https://phabricator.services.mozilla.com/D182582 |
||
---|---|---|
.. | ||
android | ||
baseprofiler | ||
build | ||
interposers | ||
linker | ||
misc | ||
static | ||
tests | ||
moz.build |