This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
glibc 2.1.95 on sparc-linux dies with SIGILL in sscanf
- To: libc-alpha at sourceware dot cygnus dot com
- Subject: glibc 2.1.95 on sparc-linux dies with SIGILL in sscanf
- From: leitner at fefe dot de
- Date: 18 Oct 2000 14:52:03 -0000
>Submitter-Id: net
>Originator: Felix von Leitner
>Organization:
Convergence
>Confidential: no
>Synopsis: programs using %f sscanf (e.g. procps) raise SIGILL
>Severity: critical
>Priority: high
>Category: libc
>Class: sw-bug
>Release: libc-2.1.95
>Environment:
Host type: sparc-unknown-linux-gnu
System: Linux hellhound 2.4.0-test9 #6 Fri Oct 6 18:15:01 CEST 2000 i686 unknown
Architecture: i686
Addons: linuxthreads
Build CFLAGS: -pipe -O2 -msupersparc
Build CC: sparc-linux-gcc
Compiler version: 2.95.2 19991024 (release)
Kernel headers: 2.4.0-test9
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: yes
Build omitfp: no
Build bounded: no
Build static-nss: no
Stdio: libio
>Description:
The following program raises SIGILL:
>How-To-Repeat:
#include <stdio.h>
main() {
FILE *f=fopen("/proc/uptime","r");
double up,idle;
if (fscanf(f,"%lf %lf",&up,&idle) < 2) {
fprintf(stderr,"didn't work\n");
}
printf("uptime %lf, idle %lf\n",up,idle);
}
>Fix:
No idea, but gdb says the SIGILL is in
#0 0x4c970 in __strtod_internal (nptr=0x620b8 "", endptr=0xffffff, group=65535) at strtod.c:1280
1280 udiv_qrnnd (quot, n, n, 0, d);