Changeset 249857 in webkit


Ignore:
Timestamp:
Sep 13, 2019 4:18:51 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.

  • jit/ExecutableAllocator.h:

(JSC::GigacageAssertScope::GigacageAssertScope):
(JSC::GigacageAssertScope::~GigacageAssertScope):
(JSC::performJITMemcpy):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r249842 r249857  
     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        * jit/ExecutableAllocator.h:
     10        (JSC::GigacageAssertScope::GigacageAssertScope):
     11        (JSC::GigacageAssertScope::~GigacageAssertScope):
     12        (JSC::performJITMemcpy):
     13
    1142019-09-13  Yusuke Suzuki  <ysuzuki@apple.com>
    215
  • trunk/Source/JavaScriptCore/jit/ExecutableAllocator.h

    r249808 r249857  
    117117JS_EXPORT_PRIVATE void dumpJITMemory(const void*, const void*, size_t);
    118118
     119struct GigacageAssertScope {
     120    GigacageAssertScope(const void *src)
     121        : src(src)
     122    { }
     123    ~GigacageAssertScope() { RELEASE_ASSERT(!Gigacage::contains(src)); }
     124    const void* src;
     125};
     126
    119127static ALWAYS_INLINE void* performJITMemcpy(void *dst, const void *src, size_t n)
    120128{
    121     RELEASE_ASSERT(!Gigacage::contains(src));
     129    GigacageAssertScope assertScope(src);
    122130#if CPU(ARM64)
    123131    static constexpr size_t instructionSize = sizeof(unsigned);
Note: See TracChangeset for help on using the changeset viewer.