This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/22513] [4.0 regression] Miscompilation of std::list code in Boost.
- From: "redi at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jul 2005 10:00:32 -0000
- Subject: [Bug c++/22513] [4.0 regression] Miscompilation of std::list code in Boost.
- References: <20050716190121.22513.redi@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From redi at gcc dot gnu dot org 2005-07-17 10:00 -------
With mainline I still get no error. With 4.0.2 I get some errors and then the
final assertion is triggered (rather than a segfault) so using mudflap changes
the behaviour of the program:
g++40 -g -static ptr_list.2.cc -I ~/src/boost/ -fmudflap -lmudflap && ./a.out
*******
mudflap violation 1 (check/read): time=1121593057.943466 ptr=0x743440 size=8
pc=0x408aec
location=`/home/data/redi/gcc/bin/4.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.0.2/../../../../include/c++/4.0.2/bits/stl_list.h:221
(std::_List_const_iterator<void*>::operator++)'
[0x408aec]
[0x40274f]
[0x402841]
Nearby object 1: checked region begins 7337B after and ends 7344B after
mudflap object 0x7417c0: name=`malloc region'
bounds=[0x741780,0x741797] size=24 area=heap check=1r/1w liveness=2
alloc time=1121593057.943182 pc=0x40936c
[0x40936c]
[0x409b2c]
[0x40feb8]
[0x403ec9]
Nearby object 2: checked region begins 0B into and ends 7B into
mudflap dead object 0x743480: name=`malloc region'
bounds=[0x743440,0x743457] size=24 area=heap check=1r/1w liveness=2
alloc time=1121593057.943321 pc=0x40936c
[0x40936c]
[0x409b2c]
[0x40feb8]
[0x403ec9]
dealloc time=1121593057.943444 pc=0x408f4c
[0x408f4c]
[0x409f38]
[0x401ef5]
[0x401f1d]
number of nearby objects: 2
mf: assertion failure: `c.size() != c3.size()' in int main() at ptr_list.2.cc:25
Aborted
It looks like a good time for me to learn about mudflap and how to interpret
that output. Thanks for the tip, Andrew.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22513