[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#260747: g++-3.4: g++ miscompiles code



Package: g++-3.4
Version: 3.4.1-2
Followup-For: Bug #260747

I've tried to understand a bit more what's wrong and this is what I've
found out. Please tell me what other info you need.

1) setting -O0 doesn't help
2) mcopidl crashes but very strangely, when I put printf("end\n");
   into main() _just_ before return 0; I see 'end' being printed on console
   but then i get SIGSEGV.
3) GDB:
(gdb) exec ../mcopidl/.libs/mcopidl -t ../../flow/artsflow.idl
(gdb) run
Starting program: /mnt/data/system/src/kde/arts/obj-i386-linux/mcopidl/.libs/mcopidl ../mcopidl/mcopidl -t ../../flow/artsflow.idl
zsh: suspended (tty output)  gdb
root@noodles:/usr/local/src/kde/arts/obj-i386-linux/flow# fg
[1]  + continued  gdb
(no debugging symbols found)...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[Thread debuggingusing libthread_db enabled]
[New Thread 1077588640 (LWP 24623)]
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGTTOU, Stopped (tty output).
[Switching to Thread 1077588640 (LWP 24623)]
0xffffe410 in __kernel_vsyscall ()
(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0x4026e9b3 in write () from /lib/tls/i686/cmov/libc.so.6
#2  0x4020f0c9 in _IO_file_write () from /lib/tls/i686/cmov/libc.so.6
#3  0x4020e2ef in _IO_do_write () from /lib/tls/i686/cmov/libc.so.6
#4  0x4020f247 in _IO_file_xsputn () from /lib/tls/i686/cmov/libc.so.6
#5  0x401eae9e in vfprintf () from /lib/tls/i686/cmov/libc.so.6
Previous frame inner to this frame (corrupt stack?)   <--------- ??
(gdb)

4) In attachement you can find gdb session but with libc6-i686 uninstalled
   and libc6-dbg installed

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-rc2
Locale: LANG=czech, LC_CTYPE=czech

Versions of packages g++-3.4 depends on:
ii  gcc-3.4                     3.4.1-2      The GNU C compiler
ii  gcc-3.4-base                3.4.1-2      The GNU Compiler Collection (base 
ii  libc6                       2.3.2.ds1-13 GNU C Library: Shared libraries an
ii  libstdc++6-dev              3.4.1-2      The GNU Standard C++ Library v3 (d

-- no debconf information
root@noodles:/usr/local/src/kde/arts/obj-i386-linux/flow# gdb
GNU gdb 6.1-debian
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-linux".
(gdb) exec ../mcopidl/.libs/mcopidl -t ../../flow/artsflow.idl
(gdb) run
Starting program: /mnt/data/system/src/kde/arts/obj-i386-linux/mcopidl/.libs/mcopidl
zsh: suspended (tty output)  gdb
root@noodles:/usr/local/src/kde/arts/obj-i386-linux/flow# fg
[1]  + continued  gdb
(no debugging symbols found)...Using host libthread_db library "/lib/tls/libthread_db.so.1".
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...[Thread debuggingusing libthread_db enabled]
[New Thread 1077588640 (LWP 25625)]
(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGTTOU, Stopped (tty output).
[Switching to Thread 1077588640 (LWP 25625)]
0x4026df1e in __write_nocancel () from /lib/tls/libc.so.6
(gdb) bt
#0  0x4026df1e in __write_nocancel () from /lib/tls/libc.so.6
#1  0x4020e3e9 in _IO_new_file_write () from /lib/tls/libc.so.6
#2  0x4020d60f in new_do_write () from /lib/tls/libc.so.6
#3  0x4020e567 in _IO_new_file_xsputn () from /lib/tls/libc.so.6
#4  0x401ea27e in buffered_vfprintf () from /lib/tls/libc.so.6
#5  0x401e608a in vfprintf () from /lib/tls/libc.so.6
#6  0x401eea6f in fprintf () from /lib/tls/libc.so.6
#7  0x0806a50c in ?? ()
#8  0x402cfe80 in _IO_wide_data_2 () from /lib/tls/libc.so.6
#9  0x0808ddc8 in ?? ()
#10 0xbffffcd3 in ?? ()
#11 0x00000000 in ?? ()
#12 0x00000000 in ?? ()
#13 0x00000000 in ?? ()
#14 0xbffffb28 in ?? ()
#15 0x0806b07d in ?? ()
#16 0xbffffcd3 in ?? ()
#17 0xbffffbb4 in ?? ()
#18 0x0808df36 in ?? ()
#19 0x4019e69c in ?? ()
#20 0x4019e700 in ?? ()
#21 0x40016c40 in ?? () from /lib/ld-linux.so.2
#22 0x40017014 in ?? ()
#23 0x08059967 in ?? ()
#24 0x0811c6f0 in ?? ()
#25 0x00000008 in ?? ()
#26 0x08161960 in ?? ()
#27 0x08161960 in ?? ()
#28 0x08161b60 in ?? ()
#29 0x0811c6fc in ?? ()
#30 0x08161960 in ?? ()
#31 0x08161960 in ?? ()
#32 0x08161b60 in ?? ()
#33 0x0811c6fc in ?? ()
#34 0x00000001 in ?? ()
#35 0xbffffae4 in ?? ()
#36 0x403a42bc in ?? () from /usr/lib/libstdc++.so.6
#37 0x00000277 in ?? ()
#38 0xbffffae8 in ?? ()
#39 0x08070e13 in ?? ()
#40 0x00000001 in ?? ()
#41 0x0000ffff in ?? ()
#42 0x40016e78 in _r_debug ()
#43 0x00004c47 in ?? ()
#44 0xbffffc30 in ?? ()
---Type <return> to continue, or q <return> to quit---
#45 0x401aa16c in ?? () from /lib/tls/libc.so.6
#46 0xbffffaf8 in ?? ()
#47 0x0808ab25 in ?? ()
#48 0x402d73e8 in initial () from /lib/tls/libc.so.6
#49 0x0809145c in ?? ()
#50 0xbffffb08 in ?? ()
#51 0x0805a53d in ?? ()
#52 0x402121bb in _IO_check_libio () from /lib/tls/libc.so.6
#53 0x0808aa5b in ?? ()
#54 0x40016e78 in _r_debug ()
#55 0x401cba93 in __new_exitfn () from /lib/tls/libc.so.6
#56 0x402d6ebc in __DTOR_END__ () from /lib/tls/libc.so.6
#57 0xbffffbb4 in ?? ()
#58 0x401b47f8 in __libc_start_main () from /lib/tls/libc.so.6
#59 0x0805aca1 in ?? ()
(gdb)

Reply to: