Changeset 106185 in webkit
- Timestamp:
- Jan 28, 2012 2:18:32 AM (12 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r106170 r106185 1 2012-01-28 Filip Pizlo <fpizlo@apple.com> 2 3 GC invoked while doing an old JIT property storage reallocation may lead 4 to an object that refers to a dead structure 5 https://bugs.webkit.org/show_bug.cgi?id=77273 6 <rdar://problem/10770565> 7 8 Reviewed by Gavin Barraclough. 9 10 The put_by_id transition was already saving the old structure by virtue of 11 having the object on the stack, so that wasn't going to get deleted. But the 12 new structure was unprotected in the transition. I've now changed the 13 transition code to save the new structure, ensuring that the GC will know it 14 to be marked if invoked from within put_by_id_transition_realloc. 15 16 * jit/JITPropertyAccess.cpp: 17 (JSC::JIT::privateCompilePutByIdTransition): 18 * jit/JITPropertyAccess32_64.cpp: 19 (JSC::JIT::privateCompilePutByIdTransition): 20 * jit/JITStubs.cpp: 21 (JSC::DEFINE_STUB_FUNCTION): 22 * jit/JITStubs.h: 23 (JSC): 24 (): 25 1 26 2012-01-27 Sheriff Bot <webkit.review.bot@gmail.com> 2 27 -
trunk/Source/JavaScriptCore/jit/JITPropertyAccess.cpp
r105636 r106185 549 549 stubCall.skipArgument(); // value 550 550 stubCall.addArgument(TrustedImm32(oldStructure->propertyStorageCapacity())); 551 stubCall.addArgument(TrustedImm 32(newStructure->propertyStorageCapacity()));551 stubCall.addArgument(TrustedImmPtr(newStructure)); 552 552 stubCall.call(regT0); 553 553 emitGetJITStubArg(2, regT1); -
trunk/Source/JavaScriptCore/jit/JITPropertyAccess32_64.cpp
r105636 r106185 518 518 stubCall.skipArgument(); // value 519 519 stubCall.addArgument(TrustedImm32(oldStructure->propertyStorageCapacity())); 520 stubCall.addArgument(TrustedImm 32(newStructure->propertyStorageCapacity()));520 stubCall.addArgument(TrustedImmPtr(newStructure)); 521 521 stubCall.call(regT0); 522 522 -
trunk/Source/JavaScriptCore/jit/JITStubs.cpp
r106067 r106185 1491 1491 JSValue baseValue = stackFrame.args[0].jsValue(); 1492 1492 int32_t oldSize = stackFrame.args[3].int32(); 1493 int32_t newSize = stackFrame.args[4].int32(); 1493 Structure* newStructure = stackFrame.args[4].structure(); 1494 int32_t newSize = newStructure->propertyStorageCapacity(); 1494 1495 1495 1496 ASSERT(baseValue.isObject()); -
trunk/Source/JavaScriptCore/jit/JITStubs.h
r106067 r106185 60 60 class RegisterFile; 61 61 class RegExp; 62 class Structure; 62 63 63 64 template <typename T> class Weak; … … 79 80 JSGlobalObject* globalObject() { return static_cast<JSGlobalObject*>(asPointer); } 80 81 JSString* jsString() { return static_cast<JSString*>(asPointer); } 82 Structure* structure() { return static_cast<Structure*>(asPointer); } 81 83 ReturnAddressPtr returnAddress() { return ReturnAddressPtr(asPointer); } 82 84 };
Note: See TracChangeset
for help on using the changeset viewer.