This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/6179: EH regression test failure for STLport-4.5.3
- From: gbeauchesne at mandrakesoft dot com
- To: gcc-gnats at gcc dot gnu dot org
- Cc: jason at redhat dot com
- Date: 4 Apr 2002 23:25:53 -0000
- Subject: c++/6179: EH regression test failure for STLport-4.5.3
- Reply-to: gbeauchesne at mandrakesoft dot com
>Number: 6179
>Category: c++
>Synopsis: EH regression test failure for STLport-4.5.3
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Thu Apr 04 15:26:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Gwenole Beauchesne
>Release: 3.1 (20020401)
>Organization:
>Environment:
i586-mandrake-linux-gnu
binutils-2.11.93.0.2 or binutils-2.12.90.0.3
>Description:
The EH regression testsuite of STLport-4.5.3 fails if built with gcc-3.1 (20020401) at the following step, at least:
[...]
[hash_map] :testing iterator range n-size constructor (const) ... 2584 try successful
[hash_map] :testing copy constructor (const) ... Aborted
>How-To-Repeat:
I am sorry but I don't have a testcase yet and I hope the following bits could already be helpful:
- Grab STLport-4.5.3 from http://www.stlport.org/
- Build the library with g++-3.1 in src/ and test/eh/ directory with or without any optimization, that doesn't matter
- In test/eh/, run ./eh_test[_d] hash_map
In the following, I used the eh_test_d binary and run it under gdb-5.1.1
Program received signal SIGABRT, Aborted.
[Switching to Thread 1024 (LWP 31490)]
0x402919a1 in kill () from /lib/libc.so.6
Current language: auto; currently c
(gdb) where
#0 0x402919a1 in kill () from /lib/libc.so.6
#1 0x4025a37b in raise (sig=6) at signals.c:65
#2 0x40292dd3 in abort () from /lib/libc.so.6
#3 0x402033ac in std::terminate() () from /usr/lib/libstdc++.so.4
#4 0x40203427 in std::terminate() () from /usr/lib/libstdc++.so.4
#5 0x40202e22 in __cxa_call_unexpected () from /usr/lib/libstdc++.so.4
#6 0x0809f64d in hash_map (this=0xbffff6d0, _ctor_arg=@0xbffff8d0)
at LeakCheck.h:85
#7 0x08097586 in test_copy_construct<_STL::hash_map<TestClass, TestClass, ThrowHash, ThrowEqual, EH_allocator<TestClass> > >::operator()(_STL::hash_map<TestClass, TestClass, ThrowHash, ThrowEqual, EH_allocator<TestClass> > const&) const (
this=0xbffff76f, t=@0xbffff8d0) at test_construct.h:43
#8 0x08096531 in void ConstCheck<_STL::hash_map<TestClass, TestClass, ThrowHash, ThrowEqual, EH_allocator<TestClass> >, test_copy_construct<_STL::hash_map<TestClass, TestClass, ThrowHash, ThrowEqual, EH_allocator<TestClass> > > >(_STL::hash_map<TestClass, TestClass, ThrowHash, ThrowEqual, EH_allocator<TestClass> > const&, test_copy_construct<_STL::hash_map<TestClass, TestClass, ThrowHash, ThrowEqual, EH_allocator<TestClass> > > const&, long) (v=@0xbffff8d0, op=@0xbffff76f,
max_iters=2000000) at LeakCheck.h:129
#9 0x08094719 in test_hash_map() () at test_hash_map.cpp:135
#10 0x0804d06b in main (argc=2, argv=0xbffff9b4) at main.cpp:333
#11 0x4027f2b0 in __libc_start_main () from /lib/libc.so.6
>Fix:
Interestingly (?), if I move some function definitions here and there, the problem vanishes.
--- test_hash_map.cpp.orig Fri Apr 5 01:13:58 2002
+++ test_hash_map.cpp Fri Apr 5 01:14:34 2002
@@ -94,12 +94,6 @@
typedef EH_STD::__hash_map__<TestClass, TestClass, ThrowHash,
ThrowEqual, eh_allocator(TestClass) > TestMap;
-inline map_tag
-container_category(const TestMap&)
-{
- return map_tag();
-}
-
void test_hash_map()
{
# if !(defined (_MSC_VER) && (_MSC_VER < 1100))
@@ -136,6 +130,12 @@
WeakCheck( testMap, test_assign_op<TestMap>( testMap2 ) );
# endif
+}
+
+inline map_tag
+container_category(const TestMap&)
+{
+ return map_tag();
}
#endif // EH_HASHED_CONTAINERS_IMPLEMENTED
>Release-Note:
>Audit-Trail:
>Unformatted: