pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: segfault in qt4-libs 4.6.1
On Tue February 2 2010 19:09:07 Sverre Froyen wrote:
> Hi,
>
> I just upgraded pkgsrc on my laptop (running NetBSD current amd64) and I
> noticed that amarok would no longer build. I've tracked the problem down
> to what looks like an error in qt4-libs-4.6.1nb2. The following program
>
> #include <QtCore/QCoreApplication>
> #include <QtScript/QScriptEngine>
>
> int main(int argc, char **argv)
> {
> QCoreApplication app( argc, argv );
> QScriptEngine engine;
> }
>
> built with
>
> g++ -I/usr/pkg/qt4/include t.cc -L/usr/pkg/qt4/lib \
> -Wl,-R/usr/pkg/qt4/lib -lQtScript
>
> results in a segfault:
>
> Program terminated with signal 11, Segmentation fault.
> #0 0x00007f7ffd764490 in
> QTJSC::JSObject::putDirectFunctionWithoutTransition () from
> /usr/pkg/qt4/lib/libQtScript.so.4
> (gdb) bt
> #0 0x00007f7ffd764490 in
> QTJSC::JSObject::putDirectFunctionWithoutTransition () from
> /usr/pkg/qt4/lib/libQtScript.so.4
> #1 0x00007f7ffd7519b1 in QTJSC::FunctionPrototype::addFunctionProperties
> () from /usr/pkg/qt4/lib/libQtScript.so.4
> #2 0x00007f7ffd6d1162 in QTJSC::JSGlobalObject::reset ()
> from /usr/pkg/qt4/lib/libQtScript.so.4
> #3 0x00007f7ffd830367 in QTJSC::JSGlobalObject::JSGlobalObject ()
> from /usr/pkg/qt4/lib/libQtScript.so.4
> #4 0x00007f7ffd830255 in QScript::GlobalObject::GlobalObject ()
> from /usr/pkg/qt4/lib/libQtScript.so.4
> #5 0x00007f7ffd7eb369 in QScriptEnginePrivate::QScriptEnginePrivate ()
> from /usr/pkg/qt4/lib/libQtScript.so.4
> #6 0x00007f7ffd7ec41c in QScriptEngine::QScriptEngine ()
> from /usr/pkg/qt4/lib/libQtScript.so.4
> #7 0x0000000000400b42 in main ()
>
> In addition, my current version of amarok segfaults on startup.
Looks like the problem is in the encoding of JSValues. On NetBSD amd64 we end
up defining JSVALUE32_64 which encodes the values as pairs of 32-bit
quantities. The attached patch defines instead JSVALUE64 which instead uses
64-bit pointers. It makes my test program run and eliminates crashes that
I've been seeing in amarok, kwrite and likely others.
Regards,
Sverre
--- src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h.orig
2010-01-15 10:01:33.000000000 -0700
+++ src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h 2010-02-07
15:59:53.000000000 -0700
@@ -718,7 +718,7 @@
#endif
#if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) &&
!defined(WTF_USE_JSVALUE32_64)
-#if PLATFORM(X86_64) && (PLATFORM(DARWIN) || PLATFORM(LINUX) ||
PLATFORM(SOLARIS) || PLATFORM(HPUX))
+#if PLATFORM(X86_64) && (PLATFORM(DARWIN) || PLATFORM(LINUX) ||
PLATFORM(SOLARIS) || PLATFORM(HPUX) || PLATFORM(NETBSD))
#define WTF_USE_JSVALUE64 1
#elif (PLATFORM(IA64) && !PLATFORM(IA64_32)) || PLATFORM(SPARC64)
#define WTF_USE_JSVALUE64 1
Home |
Main Index |
Thread Index |
Old Index