Changeset 127829 in webkit for trunk/Source/JavaScriptCore/ChangeLog
- Timestamp:
- Sep 6, 2012, 10:53:25 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r127810 r127829 1 2012-09-06 Mark Hahnenberg <[email protected]> 2 3 JSC should have a zombie mode 4 https://bugs.webkit.org/show_bug.cgi?id=96047 5 6 Reviewed by Geoffrey Garen. 7 8 To aid clients of JSC while they are debugging memory issues, we should add a zombie 9 mode that scribbles into objects in the MarkedSpace after they are found to be dead 10 to prevent a sort of "use after free" situation. As a first cut we should support a 11 mode that just scribbles on objects prior to their being reused (i.e. while they are 12 "zombies") and a mode in which, in addition to scribbling on zombies, once an object 13 has been marked its mark bit will never be cleared, thus giving us "immortal" zombies. 14 15 These two modes will be enabled through the use of environment variables. For now these 16 will be "JSZombieEnabled" and "JSImmortalZombieEnabled". Setting them to any value will 17 result in the use of the appropriate mode. 18 19 * heap/Heap.cpp: 20 (JSC::Heap::collect): Zombifies dead objects at the end of collection if zombie mode is enabled. 21 (ZombifyCellFunctor): 22 (JSC::ZombifyCellFunctor::ZombifyCellFunctor): Sets marked bits for dead objects if in immortal mode and writes 0xbbadbeef into them. 23 (JSC::ZombifyCellFunctor::operator()): 24 (JSC): 25 (ZombifyBlockFunctor): 26 (JSC::ZombifyBlockFunctor::operator()): 27 (JSC::Heap::zombifyDeadObjects): Eagerly sweeps so that we don't write garbage into an object before it 28 is finalized/destroyed. 29 * heap/Heap.h: 30 (Heap): 31 * heap/MarkedBlock.h: 32 (MarkedBlock): 33 (JSC::MarkedBlock::forEachDeadCell): Used to iterate over dead cells at the end of collection if zombie mode is enabled. 34 (JSC): 35 * runtime/Options.cpp: 36 (JSC::Options::initialize): 37 * runtime/Options.h: 38 (JSC): 39 1 40 2012-09-05 Geoffrey Garen <[email protected]> 2 41
Note:
See TracChangeset
for help on using the changeset viewer.