Ignore:
Timestamp:
Sep 28, 2009, 9:51:11 PM (16 years ago)
Author:
[email protected]
Message:

<rdar://problem/7195704> JavaScriptCore fails to mark registers when built for x86_64 using LLVM GCC.

Reviewed by Gavin Barraclough.

  • runtime/Collector.cpp:

(JSC::Heap::markCurrentThreadConservatively): Force jmp_buf to use the appropriate alignment for a pointer
to ensure that we correctly interpret the contents of registers during marking.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/Collector.cpp

    r48558 r48854  
    783783}
    784784
     785#if COMPILER(GCC)
     786#define REGISTER_BUFFER_ALIGNMENT __attribute__ ((aligned (sizeof(void*))))
     787#else
     788#define REGISTER_BUFFER_ALIGNMENT
     789#endif
     790
    785791void Heap::markCurrentThreadConservatively(MarkStack& markStack)
    786792{
    787793    // setjmp forces volatile registers onto the stack
    788     jmp_buf registers;
     794    jmp_buf registers REGISTER_BUFFER_ALIGNMENT;
    789795#if COMPILER(MSVC)
    790796#pragma warning(push)
Note: See TracChangeset for help on using the changeset viewer.