9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] /acme/mail/src/mail.c bug?
@ 2002-10-15  2:20 Skip Tavakkolian
  0 siblings, 0 replies; only message in thread
From: Skip Tavakkolian @ 2002-10-15  2:20 UTC (permalink / raw)
  To: 9fans

Mail broke when I did a Delmesg. Acid seems to show that
there is a deref of a null. I know what needs fixing, but I don't
know what the proper action should be if winselection() returns
null. Here is the transcript:

term% broke
echo kill>/proc/17476/ctl
term% acid -l thread 17476
/proc/17476/text:386 plan 9 executable

/sys/lib/acid/port
/sys/lib/acid/thread
/sys/lib/acid/386
acid: stk()
At pc:0x0000258c:mboxcommand+0x335 /acme/mail/src/mail.c:405
mboxcommand(s=0x00000000,w=0x00027cd8) /acme/mail/src/mail.c:343
	called from mainctl+0x196 /acme/mail/src/mail.c:478
mainctl(v=0x00027cd8) /acme/mail/src/mail.c:427
	called from launcher386+0x10 /sys/src/libthread/386.c:10
launcher386(arg=0x00027cd8,f=0x000026df) /sys/src/libthread/386.c:7
	called from 0xfefefefe ?file?:0
acid: src(*PC)
/acme/mail/src/mail.c:405
 400					delmesg(buf, nil, 1);
 401				}
 402			}
 403			s = winselection(w);
 404			nargs = 1;
>405			for(i=0; s[i]; i++)
 406				if(s[i] == '\n')
 407					nargs++;
 408			targs = emalloc(nargs*sizeof(char*));	/* could be too many for a local array */
 409			nargs = getfields(s, targs, nargs, 1, "\n");
 410			for(i=0; i<nargs; i++){
acid: mboxcommand:s\s
*s<integer>*
acid: xxx=mboxcommand:s\s
acid: *xxx
(null)
acid:



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-10-15  2:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-15  2:20 [9fans] /acme/mail/src/mail.c bug? Skip Tavakkolian

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).