Bug 156533

Summary: Fix build in glibc-based BSD systems
Product: WebKit Reporter: Alberto Garcia <berto>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Minor CC: berto, cgarcia, commit-queue, keith_miller, mark.lam, mcatanzaro, msaboff, saam
Priority: P2    
Version: Other   
Hardware: Unspecified   
OS: Other   
Attachments:
Description Flags
Patch cgarcia: review+

Alberto Garcia
Reported 2016-04-13 02:48:42 PDT
In MachineStackMarker.cpp there's a number of #ifdef blocks that follow this pattern: #if OS(DARWIN) /* ... */ #elif OS(WINDOWS) /* ... */ #elif defined(__GLIBC__) /* ... */ #elif OS(FREEBSD) /* ... */ #else #error Need a way to get the frame pointer for another thread on this platform #endif This works fine in most cases except in glibc-based FreeBSD systems (Debian GNU/kFreeBSD): Source/JavaScriptCore/heap/MachineStackMarker.cpp: In member function 'void* JSC::MachineThreads::Thread::Registers::stackPointer() const': Source/JavaScriptCore/heap/MachineStackMarker.cpp:554:68: error: 'const struct mcontext_t' has no member named 'gregs' return reinterpret_cast<void*>((uintptr_t) regs.machineContext.gregs[REG_RSP]); These systems should use the code inside the OS(FREEBSD) block, so this problem can be trivially solved by swapping the last two #elif blocks.
Attachments
Patch (7.52 KB, patch)
2016-04-13 02:50 PDT, Alberto Garcia
cgarcia: review+
Alberto Garcia
Comment 1 2016-04-13 02:50:25 PDT
Alberto Garcia
Comment 2 2016-04-13 03:50:50 PDT
Note You need to log in before you can comment on or make changes to this bug.