egcs bug report

joseph@squawker.5sigma.com joseph@squawker.5sigma.com
Thu May 28 16:18:00 GMT 1998


Perl module GD.pm seg faulted when compiled -O2, ran correctly with 
optimization off.

[joseph@squawker GD-1.18]# gcc -v
Reading specs from /opt/egcs/lib/gcc-lib/powerpc-unknown-linux-gnulibc1/egcs-2.9
0.25/specs
gcc version egcs-2.90.25 980302 (egcs-1.0.2 prerelease)

[joseph@squawker GD-1.18]# uname -a
Linux squawker.5sigma.com 2.0.33-osfmach3 #1 Tue Apr 21 16:28:50 PDT 1998 ppc un
known

--- output from perl -v ---
[joseph@squawker GD-1.18]# perl -v

This is perl, version 5.004_04 built for ppc-linux

Copyright 1987-1997, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5.0 source kit.

[joseph@squawker GD-1.18]# perl -V
Summary of my perl5 (5.0 patchlevel 4 subversion 4) configuration:
  Platform:
    osname=linux, osvers=2.0.33-osfmach3, archname=ppc-linux
    uname='linux squawker.5sigma.com 2.0.33-osfmach3 #1 tue apr 21 16:28:50 pdt
1998 ppc unknown '
    hint=recommended, useposix=true, d_sigaction=define
    bincompat3=n useperlio=undef d_sfio=undef
  Compiler:
    cc='cc', optimize='-O2', gccversion=egcs-2.90.25 980302 (egcs-1.0.2 prerelea
se)
    cppflags='-Dbool=char -DHAS_BOOL'
    ccflags ='-Dbool=char -DHAS_BOOL'
    stdchar='char', d_stdstdio=define, usevfork=false
    voidflags=15, castflags=0, d_casti32=define, d_castneg=define
    intsize=4, alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
    libc=, so=so
    useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
  Built under linux
  Compiled at May 25 1998 00:23:27
  @INC:
    /usr/local/lib/perl5/ppc-linux/5.00404
    /usr/local/lib/perl5
    /usr/local/lib/perl5/site_perl/ppc-linux
    /usr/local/lib/perl5/site_perl
    .

--- output from make test (successful, no -O2) ---
[joseph@squawker GD-1.18]# make test
DEFINE=''; export DEFINE INC; \
cd libgd && make -e all
make[1]: Entering directory `/root/perl/GD-1.18/libgd'
cc -c  -Dbool=char -DHAS_BOOL     -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\" -fpic
 -I/usr/local/lib/perl5/ppc-linux/5.00404/CORE  gdfontg.c
cc -c  -Dbool=char -DHAS_BOOL     -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\" -fpic
 -I/usr/local/lib/perl5/ppc-linux/5.00404/CORE  gdfontmb.c
cc -c  -Dbool=char -DHAS_BOOL     -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\" -fpic
 -I/usr/local/lib/perl5/ppc-linux/5.00404/CORE  gdfontt.c
cc -c  -Dbool=char -DHAS_BOOL     -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\" -fpic
 -I/usr/local/lib/perl5/ppc-linux/5.00404/CORE  gdfontl.c
cc -c  -Dbool=char -DHAS_BOOL     -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\" -fpic
 -I/usr/local/lib/perl5/ppc-linux/5.00404/CORE  gdfonts.c
cc -c  -Dbool=char -DHAS_BOOL     -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\" -fpic
 -I/usr/local/lib/perl5/ppc-linux/5.00404/CORE  libgd.c
rm -rf libgd.a
ar cr libgd.a gdfontg.o gdfontmb.o gdfontt.o gdfontl.o gdfonts.o libgd.o && : li
bgd.a
chmod 755 libgd.a
make[1]: Leaving directory `/root/perl/GD-1.18/libgd'
make[1]: Entering directory `/root/perl/GD-1.18/libgd'
make[1]: Leaving directory `/root/perl/GD-1.18/libgd'
cc -c  -Dbool=char -DHAS_BOOL     -DVERSION=\"1.18\" -DXS_VERSION=\"1.18\" -fpic
 -I/usr/local/lib/perl5/ppc-linux/5.00404/CORE  GD.c
Running Mkbootstrap for GD ()
chmod 644 GD.bs
LD_RUN_PATH="/lib" cc -o blib/arch/auto/GD/GD.so  -shared -L/usr/local/lib GD.o
 libgd/libgd.a  -lm
chmod 755 blib/arch/auto/GD/GD.so
cp GD.bs ./blib/arch/auto/GD/GD.bs
chmod 644 blib/arch/auto/GD/GD.bs
PERL_DL_NONLAZY=1 /usr/local/bin/perl -I./blib/arch -I./blib/lib -I/usr/local/li
b/perl5/ppc-linux/5.00404 -I/usr/local/lib/perl5 -e 'use Test::Harness qw(&runte
sts $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/GD................ok
All tests successful.
Files=1,  Tests=12,  5 secs ( 4.54 cusr  0.17 csys =  4.71 cpu)
make[1]: Entering directory `/root/perl/GD-1.18/libgd'
make[1]: Nothing to be done for `test'.
make[1]: Leaving directory `/root/perl/GD-1.18/libgd'
[joseph@squawker GD-1.18]# make install
make[1]: Entering directory `/root/perl/GD-1.18/libgd'
make[1]: Leaving directory `/root/perl/GD-1.18/libgd'
Manifying ./blib/man3/GD.3
Installing /usr/local/lib/perl5/site_perl/ppc-linux/./auto/GD/GD.so
Installing /usr/local/lib/perl5/site_perl/ppc-linux/./auto/GD/GD.bs
Installing /usr/local/lib/perl5/site_perl/ppc-linux/./auto/libgd/extralibs.ld
Installing /usr/local/lib/perl5/site_perl/./auto/GD/autosplit.ix
Installing /usr/local/lib/perl5/site_perl/./GD.pm
Installing /usr/local/lib/perl5/site_perl/./qd.pl
Installing /usr/local/lib/perl5/man/man3/./GD.3
Writing /usr/local/lib/perl5/site_perl/ppc-linux/auto/GD/.packlist
Appending installation info to /usr/local/lib/perl5/ppc-linux/5.00404/perllocal.
pod
[joseph@squawker GD-1.18]#

--- output from make test (FAILED) ---


seph@squawker GD-1.18]# make test
DEFINE=''; export DEFINE INC; \
cd libgd && make -e all
make[1]: Entering directory `/root/perl/GD-1.18/libgd'
cc -c  -Dbool=char -DHAS_BOOL -O2           -DVERSION=\"0.10\" -DXS_VERSION=\"0.
10\" -fpic -I/usr/local/lib/perl5/ppc-linux/5.00404/CORE  gdfontg.c
cc -c  -Dbool=char -DHAS_BOOL -O2           -DVERSION=\"0.10\" -DXS_VERSION=\"0.
10\" -fpic -I/usr/local/lib/perl5/ppc-linux/5.00404/CORE  gdfontmb.c
cc -c  -Dbool=char -DHAS_BOOL -O2           -DVERSION=\"0.10\" -DXS_VERSION=\"0.
10\" -fpic -I/usr/local/lib/perl5/ppc-linux/5.00404/CORE  gdfontt.c
cc -c  -Dbool=char -DHAS_BOOL -O2           -DVERSION=\"0.10\" -DXS_VERSION=\"0.
10\" -fpic -I/usr/local/lib/perl5/ppc-linux/5.00404/CORE  gdfontl.c
cc -c  -Dbool=char -DHAS_BOOL -O2           -DVERSION=\"0.10\" -DXS_VERSION=\"0.
10\" -fpic -I/usr/local/lib/perl5/ppc-linux/5.00404/CORE  gdfonts.c
cc -c  -Dbool=char -DHAS_BOOL -O2           -DVERSION=\"0.10\" -DXS_VERSION=\"0.
10\" -fpic -I/usr/local/lib/perl5/ppc-linux/5.00404/CORE  libgd.c
rm -rf libgd.a
ar cr libgd.a gdfontg.o gdfontmb.o gdfontt.o gdfontl.o gdfonts.o libgd.o && : li
bgd.a
chmod 755 libgd.a
make[1]: Leaving directory `/root/perl/GD-1.18/libgd'
make[1]: Entering directory `/root/perl/GD-1.18/libgd'
make[1]: Leaving directory `/root/perl/GD-1.18/libgd'
cc -c  -Dbool=char -DHAS_BOOL -O2    -DVERSION=\"1.18\" -DXS_VERSION=\"1.18\" -f
pic -I/usr/local/lib/perl5/ppc-linux/5.00404/CORE  GD.c
LD_RUN_PATH="/lib" cc -o blib/arch/auto/GD/GD.so  -shared -L/usr/local/lib GD.o
 libgd/libgd.a  -lm
chmod 755 blib/arch/auto/GD/GD.so
PERL_DL_NONLAZY=1 /usr/local/bin/perl -I./blib/arch -I./blib/lib -I/usr/local/li
b/perl5/ppc-linux/5.00404 -I/usr/local/lib/perl5 -e 'use Test::Harness qw(&runte
sts $verbose); $verbose=0; runtests @ARGV;' t/*.t
t/GD................dubious
        Test returned status 0 (wstat 139, 0x8b)
        test program seems to have generated a core
FAILED--1 test script could be run, alas--no output ever seen
make: *** [test_dynamic] Error 2
[joseph@squawker GD-1.18]#

--- attempted trace with gdb ---

[joseph@squawker GD-1.18]# gdb perl
GNU gdb 4.16.97
Copyright 1997 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 "powerpc-unknown-linux-gnulibc1"...
(no debugging symbols found)...
(gdb) run -Mblib t/GD.t
Starting program: /usr/local/bin/perl -Mblib t/GD.t
Using /root/perl/GD-1.18/blib
1..12

Program received signal SIGSEGV, Segmentation fault.
0x2ae7d6e4 in ?? () from /root/perl/GD-1.18/blib/arch/auto/GD/GD.so
(gdb)




More information about the Gcc-bugs mailing list