9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Boyd Roberts boyd@france3.fr
Subject: bug in prog(3) and wm/deb [inferno]
Date: Fri, 27 Sep 1996 16:44:52 +0200	[thread overview]
Message-ID: <19960927144452.HGGXXri35Z4QMXEbkR3AFmXpxGLzX4eTtwXeDrel_TI@z> (raw)

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.




             reply	other threads:[~1996-09-27 14:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-27 14:44 Boyd [this message]
1996-09-27 16:04 rob

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=19960927144452.HGGXXri35Z4QMXEbkR3AFmXpxGLzX4eTtwXeDrel_TI@z \
    --to=9fans@9fans.net \
    /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).