summaryrefslogtreecommitdiff
path: root/syscall.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2003-09-24 22:22:41 +0000
committerRoland McGrath <roland@redhat.com>2003-09-24 22:22:41 +0000
commita9da8cd179bb8cd374164d674828df9aa441402e (patch)
tree039858bf80120ac0c62bd7836b0df82eed73148d /syscall.c
parenta3bc12eab1bd03f383e642eb340399da8c43df56 (diff)
downloadstrace-a9da8cd179bb8cd374164d674828df9aa441402e.tar.gz
strace-a9da8cd179bb8cd374164d674828df9aa441402e.tar.bz2
strace-a9da8cd179bb8cd374164d674828df9aa441402e.tar.xz
2003-09-24 Roland McGrath <roland@redhat.com>
* syscall.c (get_scno) [LINUX] [S390 || S390X]: Bail out of instruction decoding branch if TCB_INSYSCALL is clear. Reported by <jochen@penguin-breeder.org>.
Diffstat (limited to 'syscall.c')
-rw-r--r--syscall.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/syscall.c b/syscall.c
index 1fb30d9..e5c5115 100644
--- a/syscall.c
+++ b/syscall.c
@@ -777,6 +777,12 @@ struct tcb *tcp;
PT_GPR8, PT_GPR9, PT_GPR10, PT_GPR11,
PT_GPR12, PT_GPR13, PT_GPR14, PT_GPR15};
+ /* Bail out since if we stopped for a signal after the last
+ system call return, we might not be looking at the kind
+ of instruction stream we expect. */
+ if (!(tcp->flags & TCB_INSYSCALL))
+ return 1;
+
if (upeek(pid, PT_PSWADDR, &pc) < 0)
return -1;
errno = 0;