jer 15/02/18 06:30:45 Added: qtdeclarative-5.4.0-stack-direction.patch Log: Add stack size calculation fix for HPPA (bug #538674). (Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key A792A613)
Revision Changes Path 1.1 dev-qt/qtdeclarative/files/qtdeclarative-5.4.0-stack-direction.patch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-qt/qtdeclarative/files/qtdeclarative-5.4.0-stack-direction.patch?rev=1.1&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-qt/qtdeclarative/files/qtdeclarative-5.4.0-stack-direction.patch?rev=1.1&content-type=text/plain Index: qtdeclarative-5.4.0-stack-direction.patch =================================================================== commit a4152c29b6f98c32a30a824bc50a760ce6bad6c7 Author: Rolf Eike Beer <e...@emlix.com> Date: Wed Feb 4 13:24:53 2015 +0100 QML: do not check stack size if stack grows up On architectures where the stack grows upwards (i.e. HP PA-RISC) the stack limit calculation fails because the variables used to check the offset are usually close to the bottom of the stack, which is in this case the origin of the stack grows. Since these machines are a rare obscurity simply simply assume that everything is fine on these machines. The few people that are indeed running QML on such machines will probably be able configure their stack size properly by default. Task-number: QTBUG-44268 Change-Id: Ia83a39179a0f6e0602ba7a5032d386e12d8d1ba3 diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp index 5bba745..6156e5c 100644 --- a/src/qml/jsruntime/qv4engine.cpp +++ b/src/qml/jsruntime/qv4engine.cpp @@ -108,8 +108,14 @@ quintptr getStackLimit() } else size = pthread_get_stacksize_np(thread_self); stackLimit -= size; +# elif defined(__hppa) + // On some architectures the stack grows upwards. All of these are rather exotic, so simply assume + // everything is fine there. + // Known examples: + // -HP PA-RISC + stackLimit = 0; + # else - void* stackBottom = 0; pthread_attr_t attr; #if HAVE(PTHREAD_NP_H) && OS(FREEBSD) // on FreeBSD pthread_attr_init() must be called otherwise getting the attrs crashes @@ -117,7 +123,9 @@ quintptr getStackLimit() #else if (pthread_getattr_np(pthread_self(), &attr) == 0) { #endif + void *stackBottom = Q_NULLPTR; size_t stackSize = 0; + pthread_attr_getstack(&attr, &stackBottom, &stackSize); pthread_attr_destroy(&attr);