This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problems in some EH testcases


I am working on some EH failures with the shared libstdc++ v3. It
turned the problem was in some EH testcases themselves. In
g++.old-deja/g++.eh/badalloc1.C, there is

--
static __SIZE_TYPE__ arena[32767]; // so things can initialize
--

32767 is not enough when the shared libstdc++ v3 is enabled under
glibc 2.2. I got

Program received signal SIGSEGV, Segmentation fault.
0x8048846 in malloc (size=112)
    at /work/gnu/src/gcc-3.0/egcs/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C:17
17        arena[pos] = size;
(gdb) bt
#0  0x8048846 in malloc (size=112)
    at /work/gnu/src/gcc-3.0/egcs/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C:17
#1  0x4006e68b in __builtin_new (sz=112)
    at /work/gnu/src/gcc-3.0/egcs/gcc/cp/new1.cc:79
#2  0x40071ece in std::ios_base::Init::Init (this=0x400e1140)
    at /work/gnu/src/gcc-3.0/egcs/libstdc++-v3/src/ios.cc:109
#3  0x40072b96 in __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535)
    at /work/gnu/src/gcc-3.0/egcs/libstdc++-v3/bits/std_fstream.h:55
#4  0x40072be2 in global constructors keyed to std::ios_base::boolalpha ()
    at /work/gnu/src/gcc-3.0/egcs/libstdc++-v3/bits/std_fstream.h:85
#5  0x4006fbe5 in __do_global_ctors_aux ()
    at /work/gnu/src/gcc-3.0/egcs/gcc/cp/tinfo2.cc:450
#6  0x40061a8a in _init ()
   from /work/build/gnu/bin/gcc-3.0-libstdc++v3/i686-pc-linux/libstdc++-v3/src/.libs/libstdc++.so.3
#7  0x4000d9dd in _dl_init (main_map=0x40018080, argc=1, argv=0xbffff9a4, 
    env=0xbffff9ac) at dl-init.c:111

(gdb)

It is before main () is entered. When I doubled 32767, the testcase
passed. Should I invesigate other failures and send a patch?

Thanks.


-- 
H.J. Lu (hjl@gnu.org)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]