Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Jun 2001 08:35:53 +0300 (EEST)
From:      Maxim Sobolev <sobomax@mail-in.net>
To:        eischen@vigrid.com, bde@zeta.org.au
Cc:        current@FreeBSD.ORG, deischen@FreeBSD.ORG
Subject:   Re: sscanf(3) is broken in 5-CURRENT [SIGBUS]
Message-ID:  <200106040535.f545Zoo56413@mail.uic-in.net>
In-Reply-To: <Pine.SUN.3.91.1010603182456.27210A-100000@pcnet1.pcnet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 3 Jun 2001 18:29:52 -0400 (EDT), Daniel Eischen wrote:
> On Mon, 4 Jun 2001, Bruce Evans wrote:
> > On Sat, 2 Jun 2001, Maxim Sobolev wrote:
> > 
> > > It seems that something is wrong with sscanf(3) in -current - in
> > > some cases it may cause SIGBUS. I failed to reproduce the
> > > problem on 4-STABLE, so it is a -current specific bug. Attached
> > > please find small showcase that exposes the bug in question
> > > and a backtrace after SIGBUS.
> [ ... ]
> > 
> > This is because fp->_extra is not initialized by sscanf() (it is stack
> > garbage that happened to be 0 when I looked at it).
> 
> Yes, it looks like the change from _up to _extra (to hold _up and other
> locking stuff) screwed this up.  Here's a fix.  My source is a month
> out of date (DEVFS won't let my old X applications work, so I need
> to upgrade my systems before it becomes mandatory), so I don't know
> if it'll apply cleanly to -current sources.

Yes, this solved the problem. Please commit it.

-Maxim

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106040535.f545Zoo56413>