Changeset 236514 in webkit
- Timestamp:
- Sep 26, 2018, 11:57:32 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/stress/splice-should-zero-property-storage-when-rebalancing.js (added)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/runtime/JSArray.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r236496 r236514 1 2018-09-26 Keith Miller <keith_miller@apple.com> 2 3 We should zero unused property storage when rebalancing array storage. 4 https://bugs.webkit.org/show_bug.cgi?id=188151 5 6 Reviewed by Michael Saboff. 7 8 * stress/splice-should-zero-property-storage-when-rebalancing.js: Added. 9 1 10 2018-09-20 Yusuke Suzuki <yusukesuzuki@slowstart.org> 2 11 -
trunk/Source/JavaScriptCore/ChangeLog
r236505 r236514 1 2018-09-26 Keith Miller <keith_miller@apple.com> 2 3 We should zero unused property storage when rebalancing array storage. 4 https://bugs.webkit.org/show_bug.cgi?id=188151 5 6 Reviewed by Michael Saboff. 7 8 In unshiftCountSlowCase we sometimes will move property storage to the right even when net adding elements. 9 This can happen because we "balance" the pre/post-capacity in that code so we need to zero the unused 10 property storage. 11 12 * runtime/JSArray.cpp: 13 (JSC::JSArray::unshiftCountSlowCase): 14 1 15 2018-09-26 Yusuke Suzuki <yusukesuzuki@slowstart.org> 2 16 -
trunk/Source/JavaScriptCore/runtime/JSArray.cpp
r235356 r236514 425 425 memmove(newButterfly->propertyStorage() - propertySize, butterfly->propertyStorage() - propertySize, sizeof(JSValue) * propertySize + sizeof(IndexingHeader) + ArrayStorage::sizeFor(0)); 426 426 427 // We don't need to zero the pre-capacity for the concurrent GC because it is not available to use as property storage. 428 memset(newButterfly->base(0, propertyCapacity), 0, (propertyCapacity - propertySize) * sizeof(JSValue)); 429 427 430 if (allocatedNewStorage) { 428 431 // We will set the vectorLength to newVectorLength. We populated requiredVectorLength … … 430 433 for (unsigned i = requiredVectorLength; i < newVectorLength; ++i) 431 434 newButterfly->arrayStorage()->m_vector[i].clear(); 432 // We don't need to zero the pre-capacity because it is not available to use as property storage.433 memset(newButterfly->base(0, propertyCapacity), 0, (propertyCapacity - propertySize) * sizeof(JSValue));434 435 } 435 436 } else if ((newAllocBase != butterfly->base(structure)) || (preCapacity != storage->m_indexBias)) {
Note:
See TracChangeset
for help on using the changeset viewer.