Changeset 236880 in webkit
- Timestamp:
- Oct 5, 2018, 11:33:41 AM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r236873 r236880 1 2018-10-05 Mark Lam <mark.lam@apple.com> 2 3 performJITMemcpy() should handle the case when the executable allocator is not initialized yet. 4 https://bugs.webkit.org/show_bug.cgi?id=190317 5 <rdar://problem/45039398> 6 7 Reviewed by Saam Barati. 8 9 When SeparatedWXHeaps is in use, jitWriteThunkGenerator() will call performJITMemcpy() 10 to copy memory before the JIT fixed memory pool is initialize. Before r236864, 11 performJITMemcpy() would just do a memcpy in that case. We need to restore the 12 equivalent behavior. 13 14 * jit/ExecutableAllocator.cpp: 15 (JSC::isJITPC): 16 * jit/ExecutableAllocator.h: 17 (JSC::performJITMemcpy): 18 1 19 2018-10-05 Carlos Eduardo Ramalho <cadubentzen@gmail.com> 2 20 -
trunk/Source/JavaScriptCore/jit/ExecutableAllocator.cpp
r236864 r236880 332 332 return linkBuffer.finalizeCodeWithoutDisassembly<JITThunkPtrTag>(); 333 333 } 334 #else // CPU(ARM64) && USE(EXECUTE_ONLY_JIT_WRITE_FUNCTION)334 #else // not CPU(ARM64) && USE(EXECUTE_ONLY_JIT_WRITE_FUNCTION) 335 335 static void genericWriteToJITRegion(off_t offset, const void* data, size_t dataSize) 336 336 { … … 351 351 return MacroAssemblerCodeRef<JITThunkPtrTag>::createSelfManagedCodeRef(codePtr); 352 352 } 353 #endif 353 #endif // CPU(ARM64) && USE(EXECUTE_ONLY_JIT_WRITE_FUNCTION) 354 354 355 355 #else // OS(DARWIN) && HAVE(REMAP_JIT) … … 510 510 bool isJITPC(void* pc) 511 511 { 512 return allocator ->isJITPC(pc);512 return allocator && allocator->isJITPC(pc); 513 513 } 514 514 -
trunk/Source/JavaScriptCore/jit/ExecutableAllocator.h
r236864 r236880 94 94 RELEASE_ASSERT(roundUpToMultipleOf<instructionSize>(src) == src); 95 95 #endif 96 if ( dst >= startOfFixedExecutableMemoryPool() && dst < endOfFixedExecutableMemoryPool()) {96 if (isJITPC(dst)) { 97 97 RELEASE_ASSERT(reinterpret_cast<uint8_t*>(dst) + n <= endOfFixedExecutableMemoryPool()); 98 98 #if ENABLE(FAST_JIT_PERMISSIONS)
Note:
See TracChangeset
for help on using the changeset viewer.