summaryrefslogtreecommitdiff
path: root/sys/src/9/pc64/trap.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2019-01-22 21:55:20 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2019-01-22 21:55:20 +0100
commit4b2f31131adaec9bd2837d877c4732069db27999 (patch)
tree60c15abe654b2a3eb8d5ff76f495e963027be475 /sys/src/9/pc64/trap.c
parent927e342aca77bd5a1c3752e54b2385f6bb1c2208 (diff)
pc64: properly handle faulterror in faultamd64()
replicate what faulterror() would have done with up->nerrlab == 0, that is, terminate the process.
Diffstat (limited to 'sys/src/9/pc64/trap.c')
-rw-r--r--sys/src/9/pc64/trap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/src/9/pc64/trap.c b/sys/src/9/pc64/trap.c
index 23c1e9b69..f1db63c23 100644
--- a/sys/src/9/pc64/trap.c
+++ b/sys/src/9/pc64/trap.c
@@ -698,6 +698,10 @@ faultamd64(Ureg* ureg, void*)
up->insyscall = 1;
f = fpusave();
if(!user && waserror()){
+ if(up->nerrlab == 0){
+ pprint("suicide: sys: %s\n", up->errstr);
+ pexit(up->errstr, 1);
+ }
int s = splhi();
fpurestore(f);
up->insyscall = insyscall;