⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 273104 in webkit


Ignore:
Timestamp:
Feb 18, 2021, 3:20:43 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

[JSC] Fix segfaults on 32-bit big endian systems
​https://bugs.webkit.org/show_bug.cgi?id=221710

Patch by Daniel Kolesa <Daniel Kolesa> on 2021-02-18
Reviewed by Yusuke Suzuki.

In these cases, we are loading values from memory into registers.
Seemingly, these values are present at an offset on 32-bit big
endian targets; therefore, add PayloadOffset, which is 4 on BE
and 0 on LE (same behavior as right now) and is already present
in other similar accesses in the file.

  • llint/LowLevelInterpreter32_64.asm:
Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r273086 r273104  
     12021-02-18  Daniel Kolesa  <dkolesa@igalia.com>
     2
     3        [JSC] Fix segfaults on 32-bit big endian systems
     4        https://bugs.webkit.org/show_bug.cgi?id=221710
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        In these cases, we are loading values from memory into registers.
     9        Seemingly, these values are present at an offset on 32-bit big
     10        endian targets; therefore, add PayloadOffset, which is 4 on BE
     11        and 0 on LE (same behavior as right now) and is already present
     12        in other similar accesses in the file.
     13
     14        * llint/LowLevelInterpreter32_64.asm:
     15
    1162021-02-18  Michael Saboff  <msaboff@apple.com>
    217
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter32_64.asm

    r272580 r273104  
    15801580    assert(macro (ok) btpnz t3, ok end)
    15811581
    1582     loadp Structure::m_prototype[t2], t2
     1582    loadp Structure::m_prototype + PayloadOffset[t2], t2
    15831583    btpz t2, .opPutByIdTransitionChainDone
    15841584.opPutByIdTransitionChainLoop:
    … …  
    15861586    bineq t1, JSCell::m_structureID[t2], .opPutByIdSlow
    15871587    addp 4, t3
    1588     loadp Structure::m_prototype[t1], t2
     1588    loadp Structure::m_prototype + PayloadOffset[t1], t2
    15891589    btpnz t2, .opPutByIdTransitionChainLoop
    15901590
    … …  
    22522252
    22532253op(llint_throw_from_slow_path_trampoline, macro()
    2254     loadp Callee[cfr], t1
     2254    loadp Callee + PayloadOffset[cfr], t1
    22552255    convertCalleeToVM(t1)
    22562256    copyCalleeSavesToVMEntryFrameCalleeSavesBuffer(t1, t2)
    … …  
    22612261    # the throw target is not necessarily interpreted code, we come to here.
    22622262    # This essentially emulates the JIT's throwing protocol.
    2263     loadp Callee[cfr], t1
     2263    loadp Callee + PayloadOffset[cfr], t1
    22642264    convertCalleeToVM(t1)
    22652265    jmp VM::targetMachinePCForThrow[t1]
Note: See TracChangeset for help on using the changeset viewer.