From owner-freebsd-current Sun Jun 3 22:36:36 2001 Delivered-To: freebsd-current@freebsd.org Received: from kalaid.f2f.com.ua (kalaid.f2f.com.ua [62.149.0.33]) by hub.freebsd.org (Postfix) with ESMTP id 453E237B403; Sun, 3 Jun 2001 22:36:28 -0700 (PDT) (envelope-from sobomax@mail-in.net) Received: from mail.uic-in.net (root@[212.35.189.4]) by kalaid.f2f.com.ua (8.11.3/8.11.1) with ESMTP id f545bgT11611; Mon, 4 Jun 2001 08:37:43 +0300 (EEST) (envelope-from sobomax@mail-in.net) Received: from notebook.vega.com (das0-l20.uic-in.net [212.35.189.147]) by mail.uic-in.net (8.11.3/8.11.3) with ESMTP id f545Zoo56413; Mon, 4 Jun 2001 08:35:53 +0300 (EEST) (envelope-from sobomax@mail-in.net) Date: Mon, 4 Jun 2001 08:35:53 +0300 (EEST) Message-Id: <200106040535.f545Zoo56413@mail.uic-in.net> To: eischen@vigrid.com, bde@zeta.org.au Cc: current@FreeBSD.ORG, deischen@FreeBSD.ORG From: Maxim Sobolev Reply-To: sobomax@FreeBSD.ORG Subject: Re: sscanf(3) is broken in 5-CURRENT [SIGBUS] X-Mailer: Pygmy (v0.5.8) In-Reply-To: Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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