From 5326e17d9a365c48cd7c2dab91f15cb5542e7bd7 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Sat, 28 Jan 1995 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1995-01-28 --- carrera/trap.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/carrera/trap.c b/carrera/trap.c index 10675cc0d2f84cff4dd8d0f69b4316202d1184ea..bdc55828e7afd4340901aadded769807a8296690 100644 --- a/carrera/trap.c +++ b/carrera/trap.c @@ -512,7 +512,6 @@ notify(Ureg *ur) if(n->flag != NUser && (up->notified || up->notify==0)) { if(n->flag == NDebug) pprint("suicide: %s\n", n->msg); - qunlock(&up->debug); pexit(n->msg, n->flag!=NDebug); } @@ -531,7 +530,7 @@ notify(Ureg *ur) sp -= sizeof(Ureg); if(!okaddr((ulong)up->notify, BY2WD, 0) || - !okaddr(sp-ERRLEN-4*BY2WD, sizeof(Ureg)+ERRLEN-4*BY2WD, 1)) { + !okaddr(sp-ERRLEN-4*BY2WD, sizeof(Ureg)+ERRLEN+4*BY2WD, 1)) { pprint("suicide: bad address or sp in notify\n"); qunlock(&up->debug); pexit("Suicide", 0); @@ -601,7 +600,7 @@ noted(Ureg *kur, Ureg **urp, ulong arg0) pexit("Suicide", 0); } - oureg = (ulong)up->ureg; + oureg = (ulong)nur; if(oureg){ if(oureg>=USTKTOP || ouregsp = sp; - ((ulong*)sp)[1] = (ulong)up->ureg; /* arg 1 0(FP) is ureg* */ + ((ulong*)sp)[1] = oureg; /* arg 1 0(FP) is ureg* */ ((ulong*)sp)[0] = 0; /* arg 0 is pc */ (*urp)->r1 = oureg; /* arg 1 is ureg* */ (*urp)->hr1 = 0;