From: Rob Pike <rob@mightycheese.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] acme suicide
Date: Fri, 12 Mar 2004 10:08:48 -0800 [thread overview]
Message-ID: <4F129E0C-7450-11D8-B24B-000A95D0C144@mightycheese.com> (raw)
In-Reply-To: <fd5537fcee6a.fcee6afd5537@cwru.edu>
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." <r@geekmail.cc>
> 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<Maxstring){---
>>> if(f->elog.type==Insert && q0==f->elog.q0 && f-
>>> elog.nr+nr<Maxstring){r%
>>
>> -rob
>>
>>
next prev parent reply other threads:[~2004-03-12 18:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-09 13:48 Noah Evans
2004-03-12 18:08 ` Rob Pike [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-10-27 10:44 [9fans] Acme suicide Uriel
2005-10-27 13:28 ` Russ Cox
2005-03-18 17:46 [9fans] acme suicide Sam
2005-03-18 18:09 ` Russ Cox
2004-03-08 19:27 Noah Evans
2004-03-09 5:28 ` rob pike, esq.
2004-03-09 5:38 ` David Tolpin
2004-03-09 5:55 ` lucio
2004-03-09 6:06 ` rob pike, esq.
2004-03-09 6:09 ` David Tolpin
2004-03-09 5:23 ` andrey mirtchovski
2004-03-09 6:31 ` David Tolpin
2004-03-09 13:44 ` David Presotto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F129E0C-7450-11D8-B24B-000A95D0C144@mightycheese.com \
--to=rob@mightycheese.com \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).