diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-01-17 07:11:26 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-01-17 07:12:23 +0100 |
commit | f596553e03c3969f6e7cb5344c05591da6e70dfb (patch) | |
tree | 8aef667749e1adc015cbc9c5ec5b5af9c6d4c15c /src/qml/jsruntime/qv4mm.cpp | |
parent | e32845b137834ef46d68345a0029d4af7c1d85bb (diff) | |
parent | 7030adff1869e850a7b983e88d7a773d5d594886 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
.qmake.conf
src/imports/dialogs/DefaultFileDialog.qml
src/imports/widgets/qquickqfiledialog.cpp
Change-Id: I00de6dd05cb773f01254061d585a82c90b229acd
Diffstat (limited to 'src/qml/jsruntime/qv4mm.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4mm.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4mm.cpp b/src/qml/jsruntime/qv4mm.cpp index 625e34de07..d55ddead89 100644 --- a/src/qml/jsruntime/qv4mm.cpp +++ b/src/qml/jsruntime/qv4mm.cpp @@ -234,12 +234,17 @@ MemoryManager::MemoryManager() # else void* stackBottom = 0; pthread_attr_t attr; - pthread_getattr_np(pthread_self(), &attr); - size_t stackSize = 0; - pthread_attr_getstack(&attr, &stackBottom, &stackSize); - pthread_attr_destroy(&attr); + if (pthread_getattr_np(pthread_self(), &attr) == 0) { + size_t stackSize = 0; + pthread_attr_getstack(&attr, &stackBottom, &stackSize); + pthread_attr_destroy(&attr); - m_d->stackTop = static_cast<quintptr *>(stackBottom) + stackSize/sizeof(quintptr); + m_d->stackTop = static_cast<quintptr *>(stackBottom) + stackSize/sizeof(quintptr); + } else { + // can't scan the native stack so have to rely on exact gc + m_d->stackTop = 0; + m_d->exactGC = true; + } # endif #elif OS(WINCE) if (false && g_stackBase) { |