Message-ID: <369BD204.4C3E3AD2@gmx.net> Date: Tue, 12 Jan 1999 21:51:48 -0100 From: Robert Hoehne Organization: none provided X-Mailer: Mozilla 4.07 [de] (Win95; I) MIME-Version: 1.0 To: DJGPP Mailing list Subject: Bug when printing long doubles Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com I haven't the time to seach deeper for that bug, so I thought that I report it. Here at first the test program ---file pr.c-------------------------------------------------- #include int main() { char buf[100]; unsigned char i[10] = { 0x13, 0x22, 0xf7, 0xfc, 0x2f, 0x3e, 0x28, 0x6f, 0x3a, 0xa3 }; sprintf(buf, "%*.17LG", 16, *((long double *)i)); fprintf(stderr, "%s\n", buf); return 0; } --end of pr.c----------------------------------------------------- the program was build with gcc -o pr.exe pr.c doprnt.c -g (where doprnt.c is from the DJGPP 2.02 libc sources) and here now the traceback: O:\RHIDE\TEST>pr Exiting due to signal SIGSEGV General Protection Fault at eip=00003490 eax=00000030 ebx=00008355 ecx=0008e974 edx=3008e9f6 esi=00000054 edi=0008fdd6 ebp=0008e9fc esp=0008e984 program=F:\OBJ\RHIDE\TEST\PR.EXE cs: sel=00a7 base=83557000 limit=0009ffff ds: sel=00b7 base=83557000 limit=0009ffff es: sel=00b7 base=83557000 limit=0009ffff fs: sel=0087 base=0000d5e0 limit=0000ffff gs: sel=00c7 base=00000000 limit=0010ffff ss: sel=00b7 base=83557000 limit=0009ffff App stack: [0008ff08..0000ff08] Exceptn stack: [0000fdf0..0000deb0] Call frame traceback EIPs: 0x00003490 cvtl, line 556 of doprnt.c 0x30303030 O:\RHIDE\TEST>gsymify -o pr.out pr.exe OK, I hope, someone will have the time to find the bug (and a patch). Robert -- ****************************************************** * email: Robert Hoehne * * Post: Am Berg 3, D-09573 Dittmannsdorf, Germany * * WWW: http://www.tu-chemnitz.de/~sho/rho * ******************************************************