From mboxrd@z Thu Jan 1 00:00:00 1970 Mime-Version: 1.0 (Apple Message framework v612) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <4F129E0C-7450-11D8-B24B-000A95D0C144@mightycheese.com> Content-Transfer-Encoding: 7bit From: Rob Pike Subject: Re: [9fans] acme suicide To: 9fans@cse.psu.edu Date: Fri, 12 Mar 2004 10:08:48 -0800 Topicbox-Message-UUID: 2cf7763a-eacd-11e9-9e20-41e7f4b1d025 this is a stupid error. an assertion failure should be reduced to a warning. /sys/src/cmd/acme/text.c:194,195 should be replaced by: if(t->ncache!=0 || t->file->b.nc || t->w==nil || t!=&t->w->body) error("text.load"); if(t->w->isdir && t->file->nname==0){ warning(nil, "empty directory name\n"); return 0; } in short, move the check for empty directory name out of the test for error. -rob On Mar 9, 2004, at 5:48 AM, Noah Evans wrote: > Awesome! another thing, have you ever tried to "Get" a nil string(when > you deleted the previous filename)? It's no biggie because I know to > avoid the error, but it might be interesting nevertheless. > > Noah > > acme: text.load: 'Del' file does not exist > acme 5965: suicide: sys: trap: fault read addr=0x0 pc=0x0003aecd > > acid: stk() > abort()+0x0 /sys/src/libc/9sys/abort.c:6 > error(s=0x4136c)+0x33 /sys/src/cmd/acme/util.c:55 > textload(t=0x82648,file=0x99d68,q0=0x0,setqid=0x1)+0x2c > /sys/src/cmd/acme/text.c:193 > get(et=0x8256c,flag1=0x1,t=0x82648,argt=0x0,arg=0x833de,narg=0x0)+0x1fe > /sys/src/cmd/acme/exec.c:497 > execute(t=0x8256c,aq0=0xc,aq1=0xc,external=0x0,argt=0x0)+0x1ec > /sys/src/cmd/acme/exec.c:190 > mousethread()+0x49d /sys/src/cmd/acme/acme.c:550 > launcher386(arg=0x0,f=0x2276)+0x10 /sys/src/libthread/386.c:10 > 0xfefefefe ?file?:0 > > ----- Original Message ----- > From: "rob pike, esq." > Date: Tuesday, March 9, 2004 0:28 am > Subject: Re: [9fans] acme suicide > >>> I tried 'Edit , | man 2 9p' in the tag of an acme window and got: >>> >>> panic: D2B called on non-block 11a8c8 (double-free?) >>> acme 1436: suicide: sys: trap: fault read addr=0x0 pc=0x0003aed5 >> >> this is kind of amazing. i was testing something for rsc and >> crashed acme. >> tracked it down, fixed it. it was a day 1 bug; amazing it had >> never happened. >> then i decided to track down your bug. turns out it's the same thing. >> amazing coincidence. >> >> here's the fix: >> >> r% yesterday -d /sys/src/cmd/acme/elog.c >> diff /n/dump/2004/0308/sys/src/cmd/acme/elog.c >> /sys/src/cmd/acme/elog.c173c173 >> < if(f->elog.type==Insert && q0==f->elog.q0 && (q0+nr)-f- >>> elog.q0>> if(f->elog.type==Insert && q0==f->elog.q0 && f- >>> elog.nr+nr> >> -rob >> >>