Changeset 249858 in webkit


Ignore:
Timestamp:
Sep 13, 2019 4:45:16 PM (5 years ago)
Author:
mark.lam@apple.com
Message:

performJITMemcpy() should do its !Gigacage assertion on exit.
https://bugs.webkit.org/show_bug.cgi?id=201780
<rdar://problem/55354867>

Reviewed by Robin Morisset.

Re-doing previous fix.

  • jit/ExecutableAllocator.h:

(JSC::performJITMemcpy):
(JSC::GigacageAssertScope::GigacageAssertScope): Deleted.
(JSC::GigacageAssertScope::~GigacageAssertScope): Deleted.

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r249857 r249858  
     12019-09-13  Mark Lam  <mark.lam@apple.com>
     2
     3        performJITMemcpy() should do its !Gigacage assertion on exit.
     4        https://bugs.webkit.org/show_bug.cgi?id=201780
     5        <rdar://problem/55354867>
     6
     7        Reviewed by Robin Morisset.
     8
     9        Re-doing previous fix.
     10
     11        * jit/ExecutableAllocator.h:
     12        (JSC::performJITMemcpy):
     13        (JSC::GigacageAssertScope::GigacageAssertScope): Deleted.
     14        (JSC::GigacageAssertScope::~GigacageAssertScope): Deleted.
     15
    1162019-09-13  Mark Lam  <mark.lam@apple.com>
    217
  • trunk/Source/JavaScriptCore/jit/ExecutableAllocator.h

    r249857 r249858  
    117117JS_EXPORT_PRIVATE void dumpJITMemory(const void*, const void*, size_t);
    118118
    119 struct GigacageAssertScope {
    120     GigacageAssertScope(const void *src)
    121         : src(src)
    122     { }
    123     ~GigacageAssertScope() { RELEASE_ASSERT(!Gigacage::contains(src)); }
    124     const void* src;
    125 };
    126 
    127119static ALWAYS_INLINE void* performJITMemcpy(void *dst, const void *src, size_t n)
    128120{
    129     GigacageAssertScope assertScope(src);
    130121#if CPU(ARM64)
    131122    static constexpr size_t instructionSize = sizeof(unsigned);
     
    145136            os_thread_self_restrict_rwx_to_rw();
    146137            memcpy(dst, src, n);
     138            RELEASE_ASSERT(!Gigacage::contains(src));
    147139            os_thread_self_restrict_rwx_to_rx();
    148140            return dst;
     
    156148            off_t offset = (off_t)((uintptr_t)dst - startOfFixedExecutableMemoryPool<uintptr_t>());
    157149            retagCodePtr<JITThunkPtrTag, CFunctionPtrTag>(g_jscConfig.jitWriteSeparateHeaps)(offset, src, n);
     150            RELEASE_ASSERT(!Gigacage::contains(src));
    158151            return dst;
    159152        }
Note: See TracChangeset for help on using the changeset viewer.