ref: 4b2f31131adaec9bd2837d877c4732069db27999
parent: 927e342aca77bd5a1c3752e54b2385f6bb1c2208
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Jan 22 16:55:20 EST 2019
pc64: properly handle faulterror in faultamd64() replicate what faulterror() would have done with up->nerrlab == 0, that is, terminate the process.
--- a/sys/src/9/pc64/trap.c
+++ b/sys/src/9/pc64/trap.c
@@ -698,6 +698,10 @@
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;