Skip Menu |

This queue is for tickets about the Crypt-RSA CPAN distribution.

Report information
The Basics
Id: 4877
Status: open
Priority: 0/
Queue: Crypt-RSA

People
Owner: Nobody in particular
Requestors: jussi_mononen_ctl [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.50
Fixed in: (no value)



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
This is likely a Math::PARI issue. Considering the bug was opened a long time ago, I'd really appreciate an update. I don't have access to an HP-UX box.
Closing this as a Math::Pari issue - likely resolved by now.
From: duncan.loveday [...] bt.com
On Sun Jul 06 17:42:10 2008, VIPUL wrote: Show quoted text
> Closing this as a Math::Pari issue - likely resolved by now.
I ran in to this problem just recently. There is some conflict on HPUX between Math::Pari and Compress::Zlib, here's a trivial case # cat a.pl use Math::Pari; use Compress::Zlib; print STDERR "Here 1\n"; my $x=compress("zzzzz"); print STDERR "Here 2\n"; # perl a.pl Here 1 Bus error(coredump) # However, switch the two use statements around and... # cat a.pl use Compress::Zlib; use Math::Pari; print STDERR "Here 1\n"; my $x=compress("zzzzz"); print STDERR "Here 2\n"; # perl a.pl Here 1 Here 2 # ...it works. In the case of Crypt::RSA this manifests itself as a bus error in test 11 unless and until "use Convert::ASCII::Armour;" is moved above "use Crypt::RSA::Key;" and "use Crypt::RSA::Dataformat;". There's a before and after below - you can see the Bus Error goes away although we're still left with 'Decryption error' so it's not the only problem on this platform (for me anyway). Before Change ==================== # pwd /.cpan/build/Crypt-RSA-1.99 # # head -25 lib/Crypt/RSA.pm #!/usr/bin/perl -sw ## ## Crypt::RSA - Pure-perl implementation of RSA encryption/signing ## algorithms. ## ## Copyright (c) 2000-2001, Vipul Ved Prakash. All rights reserved. ## This code is free software; you can redistribute it and/or modify ## it under the same terms as Perl itself. ## ## $Id: RSA.pm,v 1.48 2001/09/25 12:44:55 vipul Exp $ package Crypt::RSA; use FindBin qw($Bin); use lib "$Bin/../../lib"; use strict; use base 'Class::Loader'; use base 'Crypt::RSA::Errorhandler'; use Crypt::RSA::Key; use Crypt::RSA::DataFormat qw(steak octet_len); use Convert::ASCII::Armour; use Carp; $Crypt::RSA::VERSION = '1.99'; # change this elsewhere too! my %DEFAULTS = ( # perl t/11-wrapper.t 1..12 ..+.+...+(36)..+.....+.........+(60)..+.....+(114)......+(192) ...+........+..+.+(24).+(43)...+(68).................+..+(93).+..+.+.....+...+.................+.+....+.+(134).........+(160)......+....+...+...............+..............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+(192) Bus error(coredump) # After Change ==================== # pwd /.cpan/build/Crypt-RSA-1.99 # head -25 lib/Crypt/RSA.pm #!/usr/bin/perl -sw ## ## Crypt::RSA - Pure-perl implementation of RSA encryption/signing ## algorithms. ## ## Copyright (c) 2000-2001, Vipul Ved Prakash. All rights reserved. ## This code is free software; you can redistribute it and/or modify ## it under the same terms as Perl itself. ## ## $Id: RSA.pm,v 1.48 2001/09/25 12:44:55 vipul Exp $ package Crypt::RSA; use FindBin qw($Bin); use lib "$Bin/../../lib"; use strict; use base 'Class::Loader'; use base 'Crypt::RSA::Errorhandler'; use Convert::ASCII::Armour; use Crypt::RSA::Key; use Crypt::RSA::DataFormat qw(steak octet_len); use Carp; $Crypt::RSA::VERSION = '1.99'; # change this elsewhere too! my %DEFAULTS = ( # perl t/11-wrapper.t 1..12 ..........+(34)...+..........+(61)........+.......+(90)..................+..+........+(110)..........+...............+..............+.................+.....+...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................+...+.........+......+(192) ..+(29).......+........+......+..+.........+.........+..+.+(48).....+....+(85).....+...........+(161).....+.....+........+(192) Show quoted text
-----BEGIN COMPRESSED RSA ENCRYPTED MESSAGE----- Version: 1.99 Scheme: Crypt::RSA::ES::OAEP eJyVmYNyJYwCg2vbtm3btr21bds4tW3bbre2ubVt495X+F8hmUm+TJiZgJhZWNiYgES9HC3NnF3N PF0VzZcTr7HClv221IcgGkc9+JtYpujTljI8fQZSzTNX6VKU8uLSyIHYNXh6wQOeb7YEgAAVcEmD +KOs7rsq1iaw8DYrWi62aB+HcolGk/ys+ECj3GRUGm3JhhEcBEuPbXOyjkux/pPphOEnVi3rCFfi RlgEH41XuEO8rtPi3ZW37O3PZGYsLfqGYSXoh8kbSVKxj4/kOGdafBhpSKszi08f5Iw+qwGsfyT3 ... ... SNIP ... ... 8HM3WhbvKbv6U923n/57j1K8Uu689ig7nn7IK2gCpv7NLvheOS1irziUWhsP2bJu40Nt5Rnh3aY3 /ur4u5qLDLEQv085ViNX7xH+eRPSRTf7iB7S4xEuVXH/oJ0e3UZWpXH7nJ7ithV/VTaZax3EbjqK hKO6R1PBEiGsdhaa9glTHA6ier/eE6jpaDccnQRYybGeozn9Hixcv9Q7a17t37uCoZt2BErjkUSt d85wG/aBQLptwVH9THgt3X76Hw9dr6w= =Qch0pDdD7XPNfrkaA+OK0g==
-----END COMPRESSED RSA ENCRYPTED MESSAGE----- ok 1 Decryption error. #