From owner-freebsd-current Sat Jun 2 3:26:39 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 DE85937B422 for ; Sat, 2 Jun 2001 03:26:34 -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 f52AS6B16846 for ; Sat, 2 Jun 2001 13:28:07 +0300 (EEST) (envelope-from sobomax@mail-in.net) Received: from notebook.vega.com (das0-l46.uic-in.net [212.35.189.173]) by mail.uic-in.net (8.11.3/8.11.3) with ESMTP id f52AQQo50360 for ; Sat, 2 Jun 2001 13:26:27 +0300 (EEST) (envelope-from sobomax@mail-in.net) Date: Sat, 2 Jun 2001 13:26:27 +0300 (EEST) Message-Id: <200106021026.f52AQQo50360@mail.uic-in.net> To: current@FreeBSD.org From: Maxim Sobolev Reply-To: sobomax@FreeBSD.org Subject: sscanf(3) is broken in 5-CURRENT [SIGBUS] X-Mailer: Pygmy (v0.5.8) 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 Hi, 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. Please fix. -Maxim #include int main() { float sub; sscanf("59e", "%f", &sub); exit(0); } (gdb) r Starting program: /tmp/bug/a.out Program received signal SIGBUS, Bus error. 0x280b3ad8 in __ungetc () from /usr/lib/libc.so.5 (gdb) bt #0 0x280b3ad8 in __ungetc () from /usr/lib/libc.so.5 #1 0x280b36b1 in __svfscanf () from /usr/lib/libc.so.5 #2 0x280b25a3 in sscanf () from /usr/lib/libc.so.5 #3 0x80484c0 in main () at bug.c:8 #4 0x80483f5 in _start () To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message