WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
25325
Make sure pthread_self() is declared before it gets called
https://bugs.webkit.org/show_bug.cgi?id=25325
Summary
Make sure pthread_self() is declared before it gets called
Laszlo Gombos
Reported
2009-04-22 08:53:05 PDT
On some Unix-like platforms Collector.cpp fails to compile because pthread.h does not get included. The problem might be specific to those WebKit ports where neither WTF_USE_PTHREADS nor JSC_MULTIPLE_THREADS is defined (e.g. Qt port on Linux/FREEBSD/NETBSD). The currentThreadStackBase() in Collector.cpp calls pthread_self() on most Unix-like platforms. OPENBSD includes pthread.h explicitly but none of the other Unix-like platforms do so. On the Qt Linux WebKit build, pthread.h gets implicitly included from algorithm, which makes the Qt Unix-like builds dependent on a particular STL implementation.
Attachments
Proposed fix to include pthread.h in most Unix-like platforms (not just for OPENBSD) in Collector.cpp.
(1012 bytes, patch)
2009-04-22 08:59 PDT
,
Laszlo Gombos
darin
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Laszlo Gombos
Comment 1
2009-04-22 08:59:43 PDT
Created
attachment 29680
[details]
Proposed fix to include pthread.h in most Unix-like platforms (not just for OPENBSD) in Collector.cpp.
Holger Freyther
Comment 2
2009-05-11 20:37:37 PDT
Comment on
attachment 29680
[details]
Proposed fix to include pthread.h in most Unix-like platforms (not just for OPENBSD) in Collector.cpp.
> > #if PLATFORM(SOLARIS) > #include <thread.h> > -#endif > - > -#if PLATFORM(OPENBSD) > +#else > #include <pthread.h> > #endif >
I'm not convinced why including this for WINDOWS and DARWIN is a good idea.
Laszlo Gombos
Comment 3
2009-05-11 20:46:52 PDT
(In reply to
comment #2
)
> (From update of
attachment 29680
[details]
[review]) > > > > #if PLATFORM(SOLARIS) > > #include <thread.h> > > -#endif > > - > > -#if PLATFORM(OPENBSD) > > +#else > > #include <pthread.h> > > #endif > > > I'm not convinced why including this for WINDOWS and DARWIN is a good idea.
This entire code segment is guarded with #if PLATFORM(DARWIN) #elif PLATFORM(WIN_OS) #elif PLATFORM(UNIX) so pthread.h won't be included for WIN_OS and DARWIN. I realize that the diff does not show enough context in this case. With this additional information, I will put up the patch for review again.
Darin Adler
Comment 4
2009-05-12 07:48:17 PDT
Comment on
attachment 29680
[details]
Proposed fix to include pthread.h in most Unix-like platforms (not just for OPENBSD) in Collector.cpp. Seems OK, r=me But maybe HAVE_PTHREAD_H would be an even more reliable way of doing this.
Holger Freyther
Comment 5
2009-05-14 07:27:06 PDT
Landed in
r43698
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug