diff --git a/repos/base/include/base/thread.h b/repos/base/include/base/thread.h index 94ee27b80..3dc2fd59f 100644 --- a/repos/base/include/base/thread.h +++ b/repos/base/include/base/thread.h @@ -51,6 +51,8 @@ class Genode::Thread typedef Cpu_session::Name Name; typedef Cpu_session::Weight Weight; + struct Stack_info { addr_t base; addr_t top; }; + private: /** @@ -319,14 +321,14 @@ class Genode::Thread Native_thread &native_thread(); /** - * Return top of stack + * Return top of primary stack * * \return pointer just after first stack element */ void *stack_top() const; /** - * Return base of stack + * Return base of primary stack * * \return pointer to last stack element */ @@ -354,6 +356,11 @@ class Genode::Thread */ static Thread *myself(); + /** + * Return information about the current stack + */ + static Stack_info mystack(); + /** * Ensure that the stack has a given size at the minimum * diff --git a/repos/base/src/lib/base/thread.cc b/repos/base/src/lib/base/thread.cc index 4e895d925..352e53052 100644 --- a/repos/base/src/lib/base/thread.cc +++ b/repos/base/src/lib/base/thread.cc @@ -190,6 +190,14 @@ void *Thread::stack_base() const { return (void*)_stack->base(); } void Thread::stack_size(size_t const size) { _stack->size(size); } +Thread::Stack_info Thread::mystack() +{ + addr_t base = Stack_allocator::addr_to_base(&base); + Stack *stack = Stack_allocator::base_to_stack(base); + return { stack->base(), stack->top() }; +} + + size_t Thread::stack_virtual_size() { return Genode::stack_virtual_size(); diff --git a/repos/libports/ports/qt5.hash b/repos/libports/ports/qt5.hash index 9173a6306..723d9d3e8 100644 --- a/repos/libports/ports/qt5.hash +++ b/repos/libports/ports/qt5.hash @@ -1 +1 @@ -9ad059d85f8ad1282da3e939b5f187173b580ab2 +2db8119ea245fc40501d00968f364e0092a7f090 diff --git a/repos/libports/src/lib/qt5/patches/qt5_qtwebkit.patch b/repos/libports/src/lib/qt5/patches/qt5_qtwebkit.patch index c36c74198..405f94154 100644 --- a/repos/libports/src/lib/qt5/patches/qt5_qtwebkit.patch +++ b/repos/libports/src/lib/qt5/patches/qt5_qtwebkit.patch @@ -12,10 +12,10 @@ From: Christian Prochaska qtwebkit/Source/WTF/wtf/OSAllocatorPosix.cpp | 13 ++++++++++++ qtwebkit/Source/WTF/wtf/OSRandomSource.cpp | 8 ++++++++ qtwebkit/Source/WTF/wtf/Platform.h | 19 +++++++++++++++--- - qtwebkit/Source/WTF/wtf/StackBounds.cpp | 12 +++++++++++ + qtwebkit/Source/WTF/wtf/StackBounds.cpp | 13 ++++++++++++ qtwebkit/Source/WTF/wtf/TCSystemAlloc.cpp | 21 ++++++++++++++++++++ .../platform/graphics/qt/MediaPlayerPrivateQt.cpp | 3 +++ - 11 files changed, 96 insertions(+), 6 deletions(-) + 11 files changed, 97 insertions(+), 6 deletions(-) diff --git a/qtwebkit/Source/JavaScriptCore/dfg/DFGOperations.cpp b/qtwebkit/Source/JavaScriptCore/dfg/DFGOperations.cpp index bb9ccc3..077cbed 100644 @@ -236,7 +236,7 @@ index 35fa7e3..89e6205 100644 /* Setting this flag compares JIT results with interpreter results. */ diff --git a/qtwebkit/Source/WTF/wtf/StackBounds.cpp b/qtwebkit/Source/WTF/wtf/StackBounds.cpp -index a272ce3..a2e7484 100644 +index a272ce3..65a5a1f 100644 --- a/qtwebkit/Source/WTF/wtf/StackBounds.cpp +++ b/qtwebkit/Source/WTF/wtf/StackBounds.cpp @@ -44,6 +44,10 @@ @@ -250,7 +250,7 @@ index a272ce3..a2e7484 100644 #elif OS(UNIX) #include -@@ -128,6 +132,14 @@ void StackBounds::initialize() +@@ -128,6 +132,15 @@ void StackBounds::initialize() m_bound = estimateStackBound(m_origin); } @@ -258,8 +258,9 @@ index a272ce3..a2e7484 100644 + +void StackBounds::initialize() +{ -+ m_bound = Genode::Thread::myself()->stack_base(); -+ m_origin = Genode::Thread::myself()->stack_top(); ++ Genode::Thread::Stack_info stack_info = Genode::Thread::mystack(); ++ m_bound = (void*)stack_info.base; ++ m_origin = (void*)stack_info.top; +} + #elif OS(UNIX)