[Webkit-unassigned] [Bug 29268] New: [Qt] JSVALUE32_64 not works on Windows platform with MinGW compiler

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 15 01:34:42 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=29268

           Summary: [Qt] JSVALUE32_64 not works on Windows platform with
                    MinGW compiler
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebKit Qt
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: oszi at inf.u-szeged.hu


If building QtWebKit on Windows with MinGW compiler, I get this error message:

..\..\..\JavaScriptCore\jit\JITStubs.cpp:78: error: size of array
'dummyJITStack
Frame_maintains_16byte_stack_alignment' is negative
..\..\..\JavaScriptCore\jit\JITStubs.cpp:79: error: size of array
'dummyJITStack
Frame_stub_argument_space_matches_ctiTrampoline' is negative
..\..\..\JavaScriptCore\jit\JITStubs.cpp:80: error: size of array
'dummyJITStack
Frame_callFrame_offset_matches_ctiTrampoline' is negative
..\..\..\JavaScriptCore\jit\JITStubs.cpp:81: error: size of array
'dummyJITStack
Frame_code_offset_matches_ctiTrampoline' is negative

It caused by COMPILE_ASSERTs in JITStubs.cpp after enabling JSVALUE32_64
http://trac.webkit.org/changeset/46701

The main problem is aligning members of JITStackFrame struct.
(JavaScriptCore/jit/JITStubs.h)
If building QtWebKit on linux with gcc, the compiler use packed alignment.
JITStubArg has offset 4, 
padding has offset 52, ..., code has offset 80. But using MinGW, JITStubArg has
offset 8, because
compiler insert 4 bytes size pad before JITStubArg. First I tried to modify
padding member size to 1,
but it isn't works. (All regression test crash.) And then I tried to get
compiler using same alignment 
as on linux with __attribute__((packed)), but it isn't work.

#elif PLATFORM(X86)
#if COMPILER(MSVC)
#pragma pack(push)
#pragma pack(4)
#endif // COMPILER(MSVC)
    struct JITStackFrame {
        void* reserved; // Unused
        JITStubArg args[6];
#if USE(JSVALUE32_64)
        void* padding[2]; // Maintain 16-byte stack alignment.
#endif

        void* savedEBX;
        void* savedEDI;
        void* savedESI;
        void* savedEBP;
        void* savedEIP;

        void* code;
        RegisterFile* registerFile;
        CallFrame* callFrame;
        JSValue* exception;
        Profiler** enabledProfilerReference;
        JSGlobalData* globalData;

        // When JIT code makes a call, it pushes its return address just below
the rest of the stack.
        ReturnAddressPtr* returnAddressSlot() { return
reinterpret_cast<ReturnAddressPtr*>(this) - 1; }
    };

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list