severe libstdc++-v3 regression / pch
Joern Rennecke
joern.rennecke@superh.com
Thu May 1 22:20:00 GMT 2003
Day before yesterday, building with the sources dated 2003.04.29.15.00.00,
libstdc++-v3 tests were not satisfactory, but still indicated that the
sh-elf port was mostly working:
=== libstdc++-v3 Summary for sh-hms-sim ===
# of expected passes 1395
# of unexpected failures 195
# of expected failures 1
# of unsupported tests 6
Today, with sources dated 2003.05.01.15.00.00, the results were seriously worse:
=== libstdc++-v3 Summary for sh-hms-sim ===
# of expected passes 2
# of unexpected failures 920
# of expected failures 1
# of unsupported tests 6
Looking at the first failure, I see that size_htab - the pointer, not the
pointed to data - is clobbered, so that size_int_type_wide calls into the
middle of div_and_round_double instead of calling size_htab_hash, which
leads to a SEGV.
This is the backtrace to the point where size_htab is clobbered:
#0 _IO_file_xsgetn (fp=0x84fd208, data=0x84554c4, n=4) at fileops.c:1016
#1 0x400b05a0 in _IO_sgetn (fp=0x84fd208, data=0x84554c4, n=4) at genops.c:480
#2 0x400a4c67 in _IO_fread (buf=0x84554c4, size=4, count=1, fp=0x84fd208)
at iofread.c:44
#3 0x0824c590 in gt_pch_restore (f=0x84fd208)
at ../../srcw/gcc/ggc-common.c:588
#4 0x0815df3b in c_common_read_pch (pfile=0x84edc68,
name=0x84fe4c8 "/swbuild/nightly/2003-05-01/sh-elf/sh-elf/libstdc++-v3/include/sh-elf/bits/stdc++.h.gch/O2g", fd=7,
orig_name=0x84fe600 "/swbuild/nightly/2003-05-01/sh-elf/sh-elf/libstdc++-v3/include/sh-elf/bits/stdc++.h") at ../../srcw/gcc/c-pch.c:284
#5 0x083c8068 in stack_include_file (pfile=0x84edc68, inc=0x84fe528)
at ../../srcw/gcc/cppfiles.c:395
#6 0x083c86b7 in _cpp_execute_include (pfile=0x84edc68,
fname=0xbffff99b "bits/stdc++.h", angle_brackets=0, type=IT_CMDLINE)
at ../../srcw/gcc/cppfiles.c:770
#7 0x083c879a in cpp_push_include (pfile=0x84edc68,
filename=0xbffff99b "bits/stdc++.h") at ../../srcw/gcc/cppfiles.c:835
#8 0x0815d561 in push_command_line_include () at ../../srcw/gcc/c-opts.c:1834
#9 0x0815d077 in c_common_parse_file (set_yydebug=0)
at ../../srcw/gcc/c-opts.c:1628
#10 0x0831b152 in compile_file () at ../../srcw/gcc/toplev.c:2204
#11 0x083207ea in do_compile () at ../../srcw/gcc/toplev.c:5579
---Type <return> to continue, or q <return> to quit---
#12 0x08320837 in toplev_main (argc=50, argv=0xbfffe454)
at ../../srcw/gcc/toplev.c:5610
#13 0x4004f507 in __libc_start_main (main=0x816016c <main>, argc=50,
ubp_av=0xbfffe454, init=0x80492a0 <_init>, fini=0x83d02b0 <_fini>,
rtld_fini=0x4000dc14 <_dl_fini>, stack_end=0xbfffe44c)
at ../sysdeps/generic/libc-start.c:129
I've looked in the gcc/doc directory for documentation on the implementation
of precompiled headers, but couldn't find any - all there is is information
on how to use them when they work.
I'd also like to know what piece of the toolchain is responsible for
employing them in the first place - does the compiler do that by default,
or are they built for the libstdc++-v3 headers at library build time,
or does the testsuite set this up?
I've attached the script I used to do the builds and tests.
--
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658
-------------- next part --------------
#!/bin/bash
idate=`date -I`
echo $idate
daydir=/swbuild/nightly/$idate
mkdir $daydir
cd $daydir
expect -c 'spawn cvs -z 9 -d :pserver:anoncvs@subversions.gnu.org:/cvsroot/gcc login' -c 'expect "CVS password"' -c 'send \r' -c interact
cvs -z 9 -d :pserver:anoncvs@subversions.gnu.org:/cvsroot/gcc co -ko -D "$idate 16:00" gcc
date
expect -c 'spawn cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/src login' -c 'expect "CVS password"' -c 'send \r' -c interact
cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/src co -ko -D "$idate 16:00" binutils newlib gdb
date
mkdir srcw-l
cd srcw-l
ln -s ../gcc/* .
rm include
ln -s ../src/* .
cd ..
cp -Lpr srcw-l srcw
mkdir sh-elf
cd sh-elf
../srcw/configure --target=sh-elf
time make all-gcc all-target-newlib all-target-libstdc++-v3 all-sim
time make -k check
More information about the Gcc
mailing list