From 9fans@cse.psu.edu Thu Oct 24 15:36:37 EDT 1996 Article: 1897 of comp.os.plan9 Xref: info.ecf comp.os.plan9:1897 Newsgroups: comp.os.plan9 Path: info.ecf!utnut!cs.utexas.edu!howland.erols.net!EU.net!usenet2.news.uk.psi.net!uknet!usenet1.news.uk.psi.net!uknet!uknet!strath-cs!dcl-cs!bath.ac.uk!ccsis From: boyd@france3.FR (Boyd Roberts) Subject: bug in prog(3) and wm/deb [inferno] Approved: plan9mod@bath.ac.uk Reply-To: 9fans@cse.psu.edu Sender: ccsis@bath.ac.uk (Icarus Sparry) Organization: Plan 9 mailing list Message-ID: <199609271644.9626.inferno.baban@france3.fr> Date: Fri, 27 Sep 1996 15:17:47 GMT Lines: 36 i've found a bug in the prog file-system on windows '95. what i see is 7 fields and not 6 when i cat /prog/n/status: $ cat /prog/1/status 1 1 BOYD ROBERTS release 1K Sh[$Sys] it's the space the user name that breaks things. in turn this breaks wm/deb. i've hacked in a kludge and at the same time i've fixed a problem with it indirecting though nil: 142c142,143 < if(v != 6) --- > # kludge around problem with space in user name > if(v != 6 && v !=7) 150a152,153 > if (v == 7) > l = tl l; 177c180 < if(p != nil) --- > if(p != nil) { 179,180c182,184 < l := sys->sprint("%4d %3dK %-7s |%s", p.pid, p.size, p.state, p.mod); < tk->cmd(t, ".fl.l insert end '"+l); --- > l := sys->sprint("%4d %3dK %-7s |%s", p.pid, p.size, p.state, p.mod); > tk->cmd(t, ".fl.l insert end '"+l); > } looking at the code fragment it strikes me that the compiler could detect the use of a nil pointer by marking the variable as poisoned in the nil value code path and then future references give errors. btw: i really like wm/deb. From 9fans@cse.psu.edu Thu Oct 24 15:36:49 EDT 1996 Article: 1898 of comp.os.plan9 Xref: info.ecf comp.os.plan9:1898 Newsgroups: comp.os.plan9 Path: info.ecf!utnut!cs.utexas.edu!howland.erols.net!EU.net!usenet2.news.uk.psi.net!uknet!usenet1.news.uk.psi.net!uknet!uknet!strath-cs!dcl-cs!bath.ac.uk!ccsis From: boyd@france3.FR (Boyd Roberts) Subject: correction: Re: bug in prog(3) and wm/deb [inferno] Approved: plan9mod@bath.ac.uk Reply-To: 9fans@cse.psu.edu Sender: ccsis@bath.ac.uk (Icarus Sparry) Organization: Plan 9 mailing list Message-ID: <199609271714.9889.inferno.babap@france3.fr> References: <199609271644.9626.inferno.baban@france3.fr> Date: Fri, 27 Sep 1996 15:20:03 GMT Lines: 3 i don't know why i said wm/deb. probably because i was concentrating on using it to fix the bug in wm/task. it's wm/task that's broken, not wm/deb. sorry for the confusion. From 9fans@cse.psu.edu Thu Oct 24 15:36:58 EDT 1996 Article: 1899 of comp.os.plan9 Xref: info.ecf comp.os.plan9:1899 Newsgroups: comp.os.plan9 Path: info.ecf!utnut!cs.utexas.edu!howland.erols.net!EU.net!usenet2.news.uk.psi.net!uknet!usenet1.news.uk.psi.net!uknet!uknet!strath-cs!dcl-cs!bath.ac.uk!ccsis From: rob@plan9.bell-labs.com Subject: Re: bug in prog(3) and wm/deb [inferno] Approved: plan9mod@bath.ac.uk Reply-To: 9fans@cse.psu.edu Sender: ccsis@bath.ac.uk (Icarus Sparry) Organization: Plan 9 mailing list Message-ID: <199609271610.MAA26569@cse.psu.edu> Date: Fri, 27 Sep 1996 16:10:18 GMT Lines: 23 a slightly less kludgy fix to wm/task. wm% yesterday -d task.b diff /n/dump/1996/0927/usr/inferno/appl/wm/task.b task.b 142c142 < if(v != 6) --- > if(v < 6) 150a151,153 > # eat blanks in user name > while(len l > 3) > l = tl l; 177c180 < if(p != nil) --- > if(p != nil){ 179,180c182,184 < l := sys->sprint("%4d %3dK %-7s |%s", p.pid, p.size, p.state, p.mod); < tk->cmd(t, ".fl.l insert end '"+l); --- > l := sys->sprint("%4d %3dK %-7s |%s", p.pid, p.size, p.state, p.mod); > tk->cmd(t, ".fl.l insert end '"+l); > }