This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/36679] New: lnstat command dies if built with O1/O2
- From: "shemminger at vyatta dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jun 2008 17:15:04 -0000
- Subject: [Bug tree-optimization/36679] New: lnstat command dies if built with O1/O2
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The GCC optimizer generates code that cause a segmentation violation in
snprintf if the lnstat command from iproute2 utilities is build with -O1 or
-O2.
System: Intel Core Duo (64 bit)
Version: gcc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7)
Backtrace:
]$ gdb ./lnstat
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...
(gdb) run
Starting program: /home/shemminger/src/iproute2/misc/lnstat
Program received signal SIGSEGV, Segmentation fault.
0x00007f81a655c9d4 in vsnprintf () from /lib/libc.so.6
(gdb) where
#0 0x00007f81a655c9d4 in vsnprintf () from /lib/libc.so.6
#1 0x00007f81a653ef73 in snprintf () from /lib/libc.so.6
#2 0x00000000004015f3 in main ()
--
Summary: lnstat command dies if built with O1/O2
Product: gcc
Version: 4.2.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: shemminger at vyatta dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36679