Ignore:
Timestamp:
Mar 5, 2022, 10:59:01 PM (3 years ago)
Author:
[email protected]
Message:

Fix JITOperationList::addPointers() to support JIT_OPERATION_VALIDATION_ASSERT_ENABLED.
https://bugs.webkit.org/show_bug.cgi?id=237504
<rdar://problem/89770507>

Reviewed by Saam Barati.

According to tagJSCCodePtrImpl(), we will only use an operation's validation entry
if Options::useJITCage(). Make JITOperationList::addPointers() conform to this.

  • assembler/JITOperationList.cpp:

(JSC::JITOperationList::addPointers):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/assembler/JITOperationList.cpp

    r286901 r290873  
    6767    }
    6868#endif
    69     if constexpr (ASSERT_ENABLED) {
     69    if constexpr (JIT_OPERATION_VALIDATION_ASSERT_ENABLED) {
    7070        for (const auto* current = begin; current != end; ++current) {
    7171            void* operation = removeCodePtrTag(current->operation);
    7272            if (operation) {
    73                 void* validator = removeCodePtrTag(current->operationWithValidation);
     73                void* validator = removeCodePtrTag(Options::useJITCage() ? current->operationWithValidation : current->operation);
    7474                validator = WTF::tagNativeCodePtrImpl<OperationPtrTag>(validator);
    7575                map.add(operation, validator);
Note: See TracChangeset for help on using the changeset viewer.