From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: Saroj Mahapatra Message-ID: <6d3220b4.0207121744.4fc802e6@posting.google.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Subject: [9fans] bug in fmtfmt Date: Mon, 15 Jul 2002 09:31:24 +0000 Topicbox-Message-UUID: cc0b53b6-eaca-11e9-9e20-41e7f4b1d025 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