Subject: | Crypt::RSA test 11 fails with a segmentation fault |
I'm trying to compile Crypt::RSA on HP-UX.11.11 but the test number 11 (11-wrapper.t) fails with a segmentation fault:
PERL_DL_NONLAZY=1 /vobs/prod/tools/perl/HP-UX.11/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00-errorhandler....ok
t/01-i2osp...........ok t/02-os2ip...........ok
t/03-random_octet....ok
t/04-octet_xor.......ok
t/05-primitives......ok
t/06-oaep............ok
t/07-pss.............ok
t/08-secretkey.......ok
t/09-publickey.......ok
t/10-keygen..........ok
t/11-wrapper.........dubious
Test returned status 0 (wstat 11, 0xb)
DIED. FAILED tests 1-12
Failed 12/12 tests, 0.00% okay
t/12-versioning......ok
t/13-es-pkcs1v15.....ok
t/14-ss-pkcs1v15.....ok
t/15-benchmark.......Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
Useless use of a variable in void context at t/15-benchmark.t line 57.
t/15-benchmark.......ok
Failed Test Stat Wstat Total Fail Failed List of Failed
---------------------------------------------------------------------------------------------------------------------------------------------------
t/11-wrapper.t 0 11 12 24 200.00% 1-12
Failed 1/16 test scripts, 93.75% okay. 12/94 subtests failed, 87.23% okay.
gmake[1]: *** [test_dynamic] Error 2
gmake[1]: Leaving directory `/vobs/prod/AMD/ftp_transfer/build/HP-UX.11.11/Crypt-RSA-1.50'
gmake: *** [phase9] Error 2
---
and here is the verbose output from the same test:
perl -Mblib t/11-wrapper.t
1..12
.+(28)..................+............+.+(52)...+...........+..+......+..+.+.+...+.....+....+..+(71)...........+..+....+......+(106).........+...+.........+...+........+.+.....+...+..........+............+...+..............+..................+.....+...........+....+......+...+.+..+.........+............+..........+(192)
......+.+.+(22)..+.+(40)..+................+..............+..+.+.......+..+....+..........+(70)................+.........+.................+..........+(90)............................+..+(122)....+.+.........+..............+.....+.....+...+.............+...........+(192)
......+.+(33).+..........+(56)..+(88)...........+.+.....+..........+.....+......+.+.....+.............+..+..+...+.....+..+.....+...........+.+....+.....+.....+(114)....+.........+..................+.....+.+...+.......+...........+(168)............+................+................+........+.....+..........+................+....+...+.........+..+.+............................+............+(192)
....+.+.....+...+.....+(22).+.+........+(41)....+.....+(65).+........+.+.+(108).................+(192)
..+(33)..+(60)...................+....+(83)...+.......+........+...............+.......+.......+..+......+.....+....+.............+.+...+.........+..+.+(124)...+(148).+.....+.+.........+..+....+..+....+..+....+.....................+(192)
.+..+......+(28)..+..+(49)............+(87)..+...+.......+..+.....+.+(113)...+..+.........+...........+........+...............+.+......+.............+.....+..........+.....+..............+.....................+..................+....+(192)
Segmentation fault
---
With perl debugger I've found that the process dies with segmentation fault when invoking '$self->{pp}->armour()' -function in 'RSA.pm' line 109 (from
Convert::ASCII::Armour module). It seems that the expression '$self->{pp}->armour()' evaluates into an undefined value, thus causing a segmentation fault. Perl debugger claims that '$self->{pp}' is an empty hash.
Another oddity is that sometimes I seem to get inside the 'armour' function, but the program dies in seg fault anyway. The error location differs a bit between HP-UX.11.00 and HP-UX.11.11
---
Summary of my perl5 (revision 5.0 version 8 subversion 2) configuration:
Platform:
osname=hpux, osvers=11.11, archname=PA-RISC2.0
uname='hp-ux hp11idv2 b.11.11 u 9000800 601389372 unlimited-user license '
config_args='-Dcc=gcc'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-D_HPUX_SOURCE -mpa-risc-2-0 -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-g -O',
cppflags='-D_HPUX_SOURCE -D_HPUX_SOURCE -mpa-risc-2-0 -DDEBUGGING -fno-strict-aliasing -I/usr/local/include'
ccversion='', gccversion='3.3.1', gccosandvers='hpux11.11'
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='/usr/bin/ld', ldflags =''
libpth=/lib /usr/lib /usr/ccs/lib
libs=-lnsl -lnm -lndbm -lmalloc -ldld -lm -lcrypt -lsec -lc
perllibs=-lnsl -lnm -lmalloc -ldld -lm -lcrypt -lsec -lc
libc=/lib/libc.sl, so=sl, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-B,deferred '
cccdlflags='-fPIC', lddlflags='-b'
Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING USE_LARGE_FILES
Built under hpux
Compiled at Jan 5 2004 11:24:34
@INC:
/vobs/prod/tools/perl/HP-UX.11/lib/5.8.2/PA-RISC2.0
/vobs/prod/tools/perl/HP-UX.11/lib/5.8.2
/vobs/prod/tools/perl/HP-UX.11/lib/site_perl/5.8.2/PA-RISC2.0
/vobs/prod/tools/perl/HP-UX.11/lib/site_perl/5.8.2
/vobs/prod/tools/perl/HP-UX.11/lib/site_perl
.
---
I'm using :
HP-UX hp11idv2 B.11.11 U 9000/800 601389372 unlimited-user license