Hi folks!,
[ Please redirect me if the question is off-topic here ]
I am trying to build webkit (qt flavour, current 4.6.1 stable release) on
Solaris, and I am facing weird SEGV issues when trying to use objects such
as QWebPage. The underlying issue seems to be related to the TCMalloc*
layer.
Might be related to threading issues, too. This does not look like a
qt-centric issue, as far as I can see ; but this might be related to a
really trivial build option not set correctly - do not hesitate to give
feedback if you have a running build on Solaris.
Does anybody is experiencing the same issue on Solaris ?
The libraries have been built on Solaris 10, amd64 (64-bit), using the
official qt-everywhere-opensource-src-4.6.1.tar.gz package, with two minor
patches (see [1] and [2])
Various gcc releases have been tested for the qt/webkit build with the
same effect (3.4.3, 3.4.6, 4.1.2) ; in release and debug more (-release or
-debug)
The libraries have been built using:
./configure -shared -opensource -debug -no-separate-debug-info -webkit
-xmlpatterns -fontconfig -qt-gif -qt-libjpeg -qt-libpng -qt-libtiff
-qt-libmng -no-accessibility -no-sql-sqlite -no-phonon -no-phonon-backend
-no-audio-backend -no-multimedia -no-opengl -no-qt3support -no-declarative
-no-dbus -platform solaris-g++-64 -prefix /data/qt/qt4-install -D
ALWAYS_INLINE=inline
Note: -DALWAYS_INLINE=inline added as workaround for a build oddity (see
[3]) when using -debug
I first tested various demos, including the demo/browser one (see [4]),
and I managed to have a minimal test case:
The sample application itself is really simple:
#include <QtGui/QApplication>
#include <QtWebKit/QtWebKit>
int main(int argc, char **argv) {
QApplication *app = new QApplication(argc, argv,
QApplication::GuiClient);
QWebPage *fakePage = new QWebPage();
fakePage->action(QWebPage::Stop);
(void) app;
fprintf(stderr, "successfully started\n");
QApplication::instance()->exec();
}
This trivial program works fine on Linux, but produces a SEGV on Solaris
on the "QWebPage *fakePage = new QWebPage()" line:
(l...@1) signal SEGV (no mapping at the fault address) at 0xfffffd7ffd68a9d7
at 0xfffffd7ffd68a9d7
0xfffffd7ffd68a9d7: decl %edx
Entering debugger ...
the dbx trace shows: (sorry for the meaningless stack frame - I am trying
to get a more decent version of dbx, because the verbose library release
of libQtWebKit.so is too verbose for dbx - *sigh*)
Current function is main
16 QWebPage *fakePage = new QWebPage();
(dbx) where
[1] WTF::TCMalloc_PageHeap::GrowHeap(0xfffffd7ffea5a47c, 0x0,
0xfffffd7ffa52f, 0x0, 0x0, 0x0), at 0xfffffd7ffd68a9d7
[2] WTF::TCMalloc_Central_FreeList::FetchFromSpansSafe(0x0, 0x0, 0x0,
0x0, 0x0, 0x0), at 0xfffffd7ffd68b1b1
[3] WTF::TCMalloc_Central_FreeList::RemoveRange(0x0, 0x0, 0x0, 0x0, 0x0,
0x0), at 0xfffffd7ffd68b58b
[4] WTF::fastMalloc(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffd68c540
[5] WTF::initializeThreading(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at
0xfffffd7ffd690c0e
[6] JSC::initializeThreading(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at
0xfffffd7ffd53f965
[7] QWebPagePrivate::QWebPagePrivate(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at
0xfffffd7ffdf0abf6
[8] QWebPage::QWebPage(0x0, 0x0, 0x0, 0x0, 0x0, 0x0), at
0xfffffd7ffdf112c5
=>[9] main(argc = 1, argv = 0xfffffd7fffdfd3a8), line 16 in "test-gui.cpp"
Any hint or suggestion would be appreciated :)
[1]
--- src/3rdparty/webkit/JavaScriptCore/wtf/StringExtras.h
+++ src/3rdparty/webkit/JavaScriptCore/wtf/StringExtras.h
@@ -85,7 +85,7 @@
#endif
-#if PLATFORM(WIN_OS) || PLATFORM(LINUX)
+#if PLATFORM(WIN_OS) || PLATFORM(LINUX) || PLATFORM(SOLARIS)
inline char* strnstr(const char* buffer, const char* target, size_t
bufferLength)
{
--- src/3rdparty/javascriptcore/JavaScriptCore/wtf/StringExtras.h
+++ src/3rdparty/javascriptcore/JavaScriptCore/wtf/StringExtras.h
@@ -85,7 +85,7 @@
#endif
-#if PLATFORM(WIN_OS) || PLATFORM(LINUX)
+#if PLATFORM(WIN_OS) || PLATFORM(LINUX) || PLATFORM(SOLARIS)
inline char* strnstr(const char* buffer, const char* target, size_t
bufferLength)
{
[2] workaround for sun ld : remove the '-Wl,--gc-sections' option in
src/3rdparty/webkit/WebCore/Makefile ; also replaced configure to use
bash:
for i in $(find . -type f -name configure) ; do gsed -ie
's%^#!/bin/sh%#!/bin/bash%' "$i"; done
[3]
../JavaScriptCore/wtf/PassRefPtr.h: In static member function `static
WTF::PassRefPtr<WTF::ByteArray> WTF::ByteArray::create(size_t)':
../JavaScriptCore/wtf/PassRefPtr.h:66: sorry, unimplemented: inlining
failed in call to 'WTF::PassRefPtr<T>::~PassRefPtr() [with T =
WTF::ByteArray]': function body not available
../JavaScriptCore/wtf/ByteArray.cpp:35: sorry, unimplemented: called from
here
[4]
(dbx) where -l
current thread: t...@1
[1]
libQtWebKit.so.4.6.1:WTF::TCMalloc_PageHeap::GrowHeap(0xfffffd7fff05a47c,
0x0, 0xfffffd7ff9faf, 0x0, 0x0, 0x0), at 0xfffffd7ffdc8a9d7
[2]
libQtWebKit.so.4.6.1:WTF::TCMalloc_Central_FreeList::FetchFromSpansSafe(0x0,
0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffdc8b1b1
[3]
libQtWebKit.so.4.6.1:WTF::TCMalloc_Central_FreeList::RemoveRange(0x0, 0x0,
0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffdc8b58b
[4] libQtWebKit.so.4.6.1:WTF::fastMalloc(0x0, 0x0, 0x0, 0x0, 0x0, 0x0),
at 0xfffffd7ffdc8c540
[5] libQtWebKit.so.4.6.1:WebCore::atomicCanonicalTextEncodingName(0x0,
0x0, 0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffe36f41a
[6] libQtWebKit.so.4.6.1:WebCore::TextEncoding::TextEncoding(0x0, 0x0,
0x0, 0x0, 0x0, 0x0), at 0xfffffd7ffe36c874
[7] libQtWebKit.so.4.6.1:WebCore::UTF8Encoding(0x0, 0x0, 0x0, 0x0, 0x0,
0x0), at 0xfffffd7ffe36cbb9
[8] libQtWebKit.so.4.6.1:WebCore::KURL::KURL(0x0, 0x0, 0x0, 0x0, 0x0,
0x0), at 0xfffffd7ffe4d66c1
[9] libQtWebKit.so.4.6.1:QWebSettings::iconForUrl(0x0, 0x0, 0x0, 0x0,
0x0, 0x0), at 0xfffffd7ffe521ad5
=>[10] browser:BrowserApplication::icon(this = 0xfffffd7fffdff7c0, url =
CLASS), line 452 in "browserapplication.cpp"
[11] browser:UrlLineEdit::webViewIconChanged(this = 0x8b4910), line 292
in "urllineedit.cpp"
[12] browser:UrlLineEdit::UrlLineEdit(this = 0x8b4910, parent = (nil)),
line 265 in "urllineedit.cpp"
[13] browser:TabWidget::newTab(this = 0x757110, makeCurrent = true),
line 412 in "tabwidget.cpp"
[14] browser:BrowserMainWindow::BrowserMainWindow(this = 0x64e4f0,
parent = (nil), flags = CLASS), line 146 in "browsermainwindow.cpp"
[15] browser:BrowserApplication::newMainWindow(this =
0xfffffd7fffdff7c0), line 372 in "browserapplication.cpp"
[16] browser:main(argc = 1, argv = 0xfffffd7fffdff838), line 50 in
"main.cpp"
_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev