Ignore:
Timestamp:
Sep 22, 2017, 5:27:47 PM (8 years ago)
Author:
[email protected]
Message:

[Win64] Crashes in Yarr JIT compiled code
https://bugs.webkit.org/show_bug.cgi?id=177293

Patch by Fujii Hironori <Fujii Hironori> on 2017-09-22
Reviewed by Yusuke Suzuki.

In x64 Windows, rcx register is used for the address of allocated
space for the return value. But, rcx is used for regT1 since
r221052. Save rcx in the stack.

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::generateEnter): Push ecx.
(JSC::Yarr::YarrGenerator::generateReturn): Pop ecx.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/yarr/YarrJIT.cpp

    r221167 r222417  
    28532853        if (compileMode == IncludeSubpatterns)
    28542854            loadPtr(Address(X86Registers::ebp, 6 * sizeof(void*)), output);
     2855        // rcx is the pointer to the allocated space for result in x64 Windows.
     2856        push(X86Registers::ecx);
    28552857#endif
    28562858#elif CPU(X86)
     
    29022904#if OS(WINDOWS)
    29032905        // Store the return value in the allocated space pointed by rcx.
     2906        pop(X86Registers::ecx);
    29042907        store64(returnRegister, Address(X86Registers::ecx));
    29052908        store64(returnRegister2, Address(X86Registers::ecx, sizeof(void*)));
Note: See TracChangeset for help on using the changeset viewer.