aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-27 13:18:05 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2015-04-27 13:18:05 +0000
commitdee67b41b031791c7b6313e935e622ef8d594686 (patch)
tree1f25dc9ac0deb8b54ce2c2eff0bd855636a5f54b /src/qml/jsruntime/qv4engine.cpp
parent0699f27c9da6629ca02a1920146cb32999401676 (diff)
parente2447f9f5fbe6c8c070ce454bb48c5e45b8c35b3 (diff)
Merge "Merge remote-tracking branch 'origin/5.4' into 5.5" into refs/staging/5.5
Diffstat (limited to 'src/qml/jsruntime/qv4engine.cpp')
-rw-r--r--src/qml/jsruntime/qv4engine.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index cbfac86e9f..a247f85761 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -124,8 +124,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
@@ -133,7 +139,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);