diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-12-04 09:43:59 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-12-04 09:44:13 +0400 |
commit | cd16003d22e919d4db34e7c5465695d7c8ff3da1 (patch) | |
tree | a27893692c03d0b8eaa443c2ae9e8a7f258b318d | |
parent | cf653b70ae1f21439c19843fc7fea0c6c1cfd46d (diff) | |
download | qtwebkit-cd16003d22e919d4db34e7c5465695d7c8ff3da1.tar.gz |
Added dyson-MachineStackMarker-stackPointer.patch
-rw-r--r-- | debian/changelog | 1 | ||||
-rw-r--r-- | debian/patches/dyson-MachineStackMarker-stackPointer.patch | 92 | ||||
-rw-r--r-- | debian/patches/series | 1 |
3 files changed, 94 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 59805c1..1d4e0c5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ qtwebkit (2.2.1-7+dyson1) UNRELEASED; urgency=low * Added dyson-solaris-use-system-malloc.patch * Added dyson-yield.patch * Added dyson-MathExtras.h.patch + * Added dyson-MachineStackMarker-stackPointer.patch -- Igor Pashev <pashev.igor@gmail.com> Tue, 03 Dec 2013 23:54:22 +0400 diff --git a/debian/patches/dyson-MachineStackMarker-stackPointer.patch b/debian/patches/dyson-MachineStackMarker-stackPointer.patch new file mode 100644 index 0000000..0ec427f --- /dev/null +++ b/debian/patches/dyson-MachineStackMarker-stackPointer.patch @@ -0,0 +1,92 @@ +Index: qtwebkit/Source/JavaScriptCore/heap/MachineStackMarker.cpp +=================================================================== +--- qtwebkit.orig/Source/JavaScriptCore/heap/MachineStackMarker.cpp 2011-12-25 23:12:15.000000000 +0400 ++++ qtwebkit/Source/JavaScriptCore/heap/MachineStackMarker.cpp 2013-12-04 11:59:39.108002957 +0400 +@@ -20,6 +20,9 @@ + */ + + #include "config.h" ++#if OS(SOLARIS) ++#undef _FILE_OFFSET_BITS ++#endif + #include "MachineStackMarker.h" + + #include "ConservativeRoots.h" +@@ -60,6 +63,10 @@ + #include <unistd.h> + + #if OS(SOLARIS) ++#include <sys/types.h> ++#include <sys/stat.h> ++#include <fcntl.h> ++#include <procfs.h> + #include <thread.h> + #else + #include <pthread.h> +@@ -331,6 +338,7 @@ + #error Need a thread register struct for this platform + #endif + ++#if !OS(SOLARIS) + static size_t getPlatformThreadRegisters(const PlatformThread& platformThread, PlatformThreadRegisters& regs) + { + #if OS(DARWIN) +@@ -381,6 +389,7 @@ + #error Need a way to get thread registers on this platform + #endif + } ++#endif + + static inline void* otherThreadStackPointer(const PlatformThreadRegisters& regs) + { +@@ -431,6 +440,7 @@ + #endif + } + ++#if !OS(SOLARIS) + static void freePlatformThreadRegisters(PlatformThreadRegisters& regs) + { + #if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN) +@@ -439,9 +449,24 @@ + UNUSED_PARAM(regs); + #endif + } ++#endif + + void MachineThreads::gatherFromOtherThread(ConservativeRoots& conservativeRoots, Thread* thread) + { ++#if OS(SOLARIS) ++ struct lwpstatus lwp; ++ char procfile[64]; ++ int fd; ++ snprintf(procfile, 64, "/proc/self/lwp/%u/lwpstatus", thread->platformThread); ++ fd = open(procfile, O_RDONLY, 0); ++ if (fd == -1) { ++ fprintf(stderr, "%s: %s\n", procfile, strerror(errno)); ++ abort(); ++ } ++ pread(fd, &lwp, sizeof(lwp), 0); ++ close(fd); ++ void* stackPointer = (void*)lwp.pr_reg[REG_SP]; ++#else + suspendThread(thread->platformThread); + + PlatformThreadRegisters regs; +@@ -450,13 +475,14 @@ + conservativeRoots.add(static_cast<void*>(®s), static_cast<void*>(reinterpret_cast<char*>(®s) + regSize)); + + void* stackPointer = otherThreadStackPointer(regs); +- void* stackBase = thread->stackBase; +- swapIfBackwards(stackPointer, stackBase); +- conservativeRoots.add(stackPointer, stackBase); + + resumeThread(thread->platformThread); + + freePlatformThreadRegisters(regs); ++#endif ++ void* stackBase = thread->stackBase; ++ swapIfBackwards(stackPointer, stackBase); ++ conservativeRoots.add(stackPointer, stackBase); + } + + #endif diff --git a/debian/patches/series b/debian/patches/series index 53305bf..8400380 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -21,3 +21,4 @@ ignore-unused-local-typedefs_error.diff dyson-solaris-use-system-malloc.patch dyson-yield.patch dyson-MathExtras.h.patch +dyson-MachineStackMarker-stackPointer.patch |