https://bugs.kde.org/show_bug.cgi?id=486180

Mark Wielaard <m...@klomp.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ar...@linux.ibm.com

--- Comment #7 from Mark Wielaard <m...@klomp.org> ---
I don't really like the suggested fix in comment #6 (commit 721488688).
It is not clear to me that all arches use guest_IP_AT_SYSCALL is the same way.
The current use only really is known to work for s390x.

So I would propose something like:

diff --git a/coregrind/m_scheduler/scheduler.c
b/coregrind/m_scheduler/scheduler.c
index fc8cf7c9cb1d..6ce3551b2be9 100644
--- a/coregrind/m_scheduler/scheduler.c
+++ b/coregrind/m_scheduler/scheduler.c
@@ -1225,6 +1225,15 @@ static void handle_syscall(ThreadId tid, UInt trc)
    }
 }

+static Addr sig_ill_addr_extension (ThreadState *tst)
+{
+#if defined(VGA_s390x)
+   return tst->arch.vex.guest_IP_AT_SYSCALL;
+#else
+   VG_(core_panic)("scheduler: sig_ill_addr_extension: unhandled arch");
+#endif
+}
+
 static void handle_extension(ThreadId tid)
 {
    volatile UWord jumped;
@@ -1235,7 +1244,7 @@ static void handle_extension(ThreadId tid)

    if (err != ExtErr_OK) {
       ThreadState* tst = VG_(get_ThreadState)(tid);
-      Addr addr = tst->arch.vex.guest_IP_AT_SYSCALL;
+      Addr addr = sig_ill_addr_extension (tst);
       switch (err) {
       case ExtErr_Illop:
          VG_(synth_sigill)(tid, addr);

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to