MOZ_PROFILER_STARTUP=true MOZ_PROFILER_SHUTDOWN=$PWD/myprofile.sps mach run crashes on shutdown. This was probably triggered by the change that made us profile the compositor thread by default. What happens is that compositor thread shutdown deletes its PseudoStack, which deletes the markers. But the ThreadProfile for the compositor thread stays alive, and it has pointers to those deleted markers, and when we want to dump the compositor ThreadProfile we access those markers and crash.
We should really add a test for this. GTest might not be too bad to write for this.
Fixed by bug 1127498.