RESOLVED FIXED 156533
Fix build in glibc-based BSD systems
https://bugs.webkit.org/show_bug.cgi?id=156533
Summary Fix build in glibc-based BSD systems
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.