Skip to content

Commit

Permalink
Cherry-pick 274796@main (be51d07). https://bugs.webkit.org/show_bug.c…
Browse files Browse the repository at this point in the history
…gi?id=269534

    [JSC] Use offlineasm globl to ensure that all entries have alt_entry
    https://bugs.webkit.org/show_bug.cgi?id=269534
    rdar://122525586

    Reviewed by Justin Michaud.

    We found that vmEntryToCSSJIT and vmEntryToCSSJITAfter are not having alt_entry properly since it is not using offlineasm globl.
    This allowed LLInt code shuffled by linkers when alt_entry is used, which breaks many assumptions. This patch fixes it.

    * Source/JavaScriptCore/llint/LowLevelInterpreter.asm:

    Canonical link: https://commits.webkit.org/274796@main
  • Loading branch information
Constellation authored and aperezdc committed Mar 8, 2024
1 parent 0032643 commit a1717d6
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Source/JavaScriptCore/llint/LowLevelInterpreter.asm
Original file line number Diff line number Diff line change
Expand Up @@ -1741,15 +1741,17 @@ _vmEntryHostFunction:

# unsigned vmEntryToCSSJIT(uintptr_t, uintptr_t, uintptr_t, const void* codePtr);
if ARM64E
emit ".globl _vmEntryToCSSJIT"
emit "_vmEntryToCSSJIT:"
global _vmEntryToCSSJITAfter
end
global _vmEntryToCSSJIT
_vmEntryToCSSJIT:
functionPrologue()
jmp t3, CSSSelectorPtrTag
emit ".globl _vmEntryToCSSJITAfter"
emit "_vmEntryToCSSJITAfter:"
if ARM64E
_vmEntryToCSSJITAfter:
end
functionEpilogue()
ret
end

if not (C_LOOP or C_LOOP_WIN)
# void sanitizeStackForVMImpl(VM* vm)
Expand Down

0 comments on commit a1717d6

Please sign in to comment.