Bug 51972

Summary: pthread_getattr_np not available in LSB, but patch available to fix the issue
Product: WebKit Reporter: Craig Scott <audiofanatic>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: UNCONFIRMED ---    
Severity: Normal CC: paroga
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   

Description Craig Scott 2011-01-05 17:22:13 PST
The current source for WebKit has a problem in JavaScriptCore/wtf/StackBounds.cpp when building with the LSB compilers under linux. The problem relates to the use of pthread_getattr_np, which is not part of the LSB 4.0 spec. pthread_getattr_np may appear in LSB 4.1 by the look of it, but major linux distributions have only recently been certified for 4.0, so it would be some time before any certification to 4.1 were to happen. Thus, the LSB 4.0 spec is going to be relevant probably for another year or two at least. There is already a fix for the problem in git for WebKit, committed when the relevant part of the code was originally in JavaScriptCore/runtime/Collector.cpp before it appears to have been moved to wtf/StackBounds.cpp. The fix in git doesn't seem to have been applied to StackBounds.cpp yet though. The original bug report in the LSB bug tracker can be found here:

http://bugs.linuxbase.org/show_bug.cgi?id=2364

The relevant patch in the WebKit git can be found here:

http://gitorious.com/+qtwebkit-developers/webkit/qtwebkit/commit/cbd47dc5626f6b1063e14736c69a8c23eccc1bf1


My request stems from attempts to build Qt 4.7.1 with LSB 4.0 compilers. The original bug report to Nokia can be found here:

http://bugreports.qt.nokia.com/browse/QTBUG-16335

Since Qt imports webkit sources, I was asked to report this issue upstream to the WebKit bug tracker. Once the issue is fixed in WebKit sources, it should get picked up the next time Qt pulls in an updated WebKit. Given that a fairly widely used package (Qt) depends on webkit and that a patch already exists to fix the problem, is there any chance that this patch can be applied to the WebKit sources?
Comment 1 Craig Scott 2011-01-05 17:26:25 PST
Also note that in the patch, the following test is used in three places:

#if defined(QT_LINUXBASE)

However, the correct test should be

#if defined(__LSB_VERSION__) && (__LSB_VERSION__ < 41)
Comment 2 Patrick R. Gansterer 2011-01-06 12:05:20 PST
Can you provide a patch for this? See http://webkit.org/coding/contributing.html
Comment 3 Craig Scott 2012-08-07 21:16:21 PDT
I'm happy for someone familiar with webkit's repo's and build system to create the trivial patch from my comments provided already. My changed employment arrangements mean I no longer can commit time to these issues myself.