Bug#435723: printf with %g causes a segmentation violation.

2007-08-03 Thread Leon Bottou
On Friday 03 August 2007 08:34:15 you wrote:
 On Thu, Aug 02, 2007 at 04:44:06PM -0400, Leon Bottou wrote:
  Version: 2.5-3
  
  $ gcc l.c
  $ ./a.out
  0.000100
  1.00e-04
  Segmentation fault
  $
 I can't reproduce this with 2.6-2.
Good news.

I use a debian etch (stable) on x86_64
kept up to date with apt-get upgrade.
Basically this happens with the binary libc
currently distributed on the debian servers, as of 2007-08-03.  
I do not know which compiler has been used to compile them.

This segfault is a little bit freaky.
The value 9.9991e-05 is important.
If you take 10e-5, no segfault.
A debug trace suggests that printf calls wmemset 
with incorrect arguments. I'll try to learn more.

- L.







This is what we get with debian etch.


 




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#435723: printf with %g causes a segmentation violation.

2007-08-03 Thread Clint Adams
On Thu, Aug 02, 2007 at 04:44:06PM -0400, Leon Bottou wrote:
 Version: 2.5-3
 
 $ gcc l.c
 $ ./a.out
 0.000100
 1.00e-04
 Segmentation fault
 $

I can't reproduce this with 2.6-2.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#435723: printf with %g causes a segmentation violation.

2007-08-02 Thread Leon Bottou
Package: glibc
Version: 2.5-3

Debian version: etch
Platform: x86_64
GCC version: 4.1.1-15.

The following program causes a segmentation violation:

$ cat  l.c
#include stdio.h
int main()
{
  double d = 9.9991e-05;
  printf(%f\n, d);
  printf(%e\n, d);
  printf(%g\n, d);
}
CTRL-D

$ gcc l.c
$ ./a.out
0.000100
1.00e-04
Segmentation fault
$

That was unexpected :-).

- L.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]