Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
unversioned
-
743af4393d38a2f942904da05e7f8bc0a2d25b6c
Description
Setting MallocScribble=1 in the environment enables malloc debugging, which helps catch use-after-free, an often hard-to-reproduce sort of crash. See for instance https://codereview.qt-project.org/#/c/183740/2 which addresses a problem which from some quick history digging may have been lurking since around July. With MallocScribble enabled, this test crashes reliably.
See https://developer.apple.com/library/content/documentation/Performance/Conceptual/ManagingMemory/Articles/MallocDebug.html for more information.
There may be a performance cost involved in setting this, so it would need some care taken, but I think that the added benefit (in spotting bugs like this early) could be worthwhile.