9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] bug in fmtfmt
@ 2002-07-15 18:55 rob pike, esq.
  0 siblings, 0 replies; 2+ messages in thread
From: rob pike, esq. @ 2002-07-15 18:55 UTC (permalink / raw)
  To: 9fans

> There is a bug in fmtfmt.

Indeed there was.  I was being clever and then getting it wrong.
I have rewritten it to be less clever and more likely to be right.
Updated /sys/src/libc/fmt/fmt.c and /386/lib/libc.a on sources.

-rob



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [9fans] bug in fmtfmt
@ 2002-07-15  9:31 Saroj Mahapatra
  0 siblings, 0 replies; 2+ messages in thread
From: Saroj Mahapatra @ 2002-07-15  9:31 UTC (permalink / raw)
  To: 9fans

There is a bug in fmtfmt.

for (p=knownfmt; p->c; p++)
   if (p->c == c) {
      fmtinstanll(p->c, p->fmt);
      while (p->fmt == nil)  <--------- BUG
          ;
      
The pointer 'p' is walking through 'knownfmt'; so p->fmt can not be
nil there, becuase 'fmtinstall' only changes 'fmtalloc' array. There
is also locking issue between 'fmtinstall' and 'fmtfmt' accessing
'fmtalloc' array simultaneously.

Please take a look at this. I wish I had more time to explain this
thoroughly at this moment.

Thanks,
Saroj Mahapatra


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-15 18:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-15 18:55 [9fans] bug in fmtfmt rob pike, esq.
  -- strict thread matches above, loose matches on Subject: below --
2002-07-15  9:31 Saroj Mahapatra

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