Skip Menu |

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

Report information
The Basics
Id: 38308
Status: rejected
Priority: 0/
Queue: Crypt-DES

People
Owner: DPARIS [...] cpan.org
Requestors: airwave [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.05
Fixed in: (no value)



On Perl 5.10, I get an assertion when trying to encrypt a variable that's a hash key. The crash does not occur on Perl 5.8.5. Perl v5.10.0, Crypt::DES version 2.05. There's a simple test case attached. Stack trace: Assertion he->shared_he_he.hent_hek == hek failed: file "hv.c", line 2257 at /tmp/busted.pl line 15. *** glibc detected *** /opt/airwave/bin/perl: free(): invalid next size (fast): 0x09863690 *** ======= Backtrace: ========= /lib/libc.so.6[0x3e6aa6] /lib/libc.so.6(cfree+0x90)[0x3e9fc0] /opt/airwave/lib/perl5/5.10.0/i386-linux-thread-multi/CORE/libperl.so(Perl_safesysfree+0xff)[0x5fdb7f] /opt/airwave/lib/perl5/5.10.0/i386-linux-thread-multi/CORE/libperl.so(perl_free+0x7c)[0x6216fc] /opt/airwave/bin/perl(main+0xe8)[0x8048ac8] /lib/libc.so.6(__libc_start_main+0xdc)[0x395dec] /opt/airwave/bin/perl[0x8048951] ======= Memory map: ======== 00110000-0011f000 r-xp 00000000 fd:00 9571951 /lib/libresolv-2.5.so 0011f000-00120000 r--p 0000e000 fd:00 9571951 /lib/libresolv-2.5.so 00120000-00121000 rw-p 0000f000 fd:00 9571951 /lib/libresolv-2.5.so 00121000-00123000 rw-p 00121000 00:00 0 00123000-00136000 r-xp 00000000 fd:00 9568327 /lib/libnsl-2.5.so 00136000-00137000 r--p 00012000 fd:00 9568327 /lib/libnsl-2.5.so 00137000-00138000 rw-p 00013000 fd:00 9568327 /lib/libnsl-2.5.so 00138000-0013a000 rw-p 00138000 00:00 0 0013a000-0013f000 r-xp 00000000 fd:00 9571952 /lib/libcrypt-2.5.so 0013f000-00140000 r--p 00004000 fd:00 9571952 /lib/libcrypt-2.5.so 00140000-00141000 rw-p 00005000 fd:00 9571952 /lib/libcrypt-2.5.so 00141000-00168000 rw-p 00141000 00:00 0 00168000-0016a000 r-xp 00000000 fd:00 9571953 /lib/libutil-2.5.so 0016a000-0016b000 r--p 00001000 fd:00 9571953 /lib/libutil-2.5.so 0016b000-0016c000 rw-p 00002000 fd:00 9571953 /lib/libutil-2.5.so 0016c000-0017f000 r-xp 00000000 fd:00 9568427 /lib/libpthread-2.5.so 0017f000-00180000 r--p 00012000 fd:00 9568427 /lib/libpthread-2.5.so 00180000-00181000 rw-p 00013000 fd:00 9568427 /lib/libpthread-2.5.so 00181000-00183000 rw-p 00181000 00:00 0 00183000-00187000 r-xp 00000000 fd:00 7702257 /opt/airwave/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi/auto/Crypt/DES/DES.so 00187000-00189000 rw-p 00003000 fd:00 7702257 /opt/airwave/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi/auto/Crypt/DES/DES.so 00189000-00194000 r-xp 00000000 fd:00 9568310 /lib/libgcc_s-4.1.2-20070626.so.1 00194000-00195000 rw-p 0000a000 fd:00 9568310 /lib/libgcc_s-4.1.2-20070626.so.1 00363000-0037c000 r-xp 00000000 fd:00 9568409 /lib/ld-2.5.so 0037c000-0037d000 r--p 00019000 fd:00 9568409 /lib/ld-2.5.so 0037d000-0037e000 rw-p 0001a000 fd:00 9568409 /lib/ld-2.5.so 00380000-004ba000 r-xp 00000000 fd:00 9568438 /lib/libc-2.5.so 004ba000-004bc000 r--p 0013a000 fd:00 9568438 /lib/libc-2.5.so 004bc000-004bd000 rw-p 0013c000 fd:00 9568438 /lib/libc-2.5.so 004bd000-004c0000 rw-p 004bd000 00:00 0 004c2000-004c4000 r-xp 00000000 fd:00 9571950 /lib/libdl-2.5.so 004c4000-004c5000 r--p 00001000 fd:00 9571950 /lib/libdl-2.5.so 004c5000-004c6000 rw-p 00002000 fd:00 9571950 /lib/libdl-2.5.so 004c8000-004ed000 r-xp 00000000 fd:00 9571949 /lib/libm-2.5.so 004ed000-004ee000 r--p 00024000 fd:00 9571949 /lib/libm-2.5.so 004ee000-004ef000 rw-p 00025000 fd:00 9571949 /lib/libm-2.5.so 00556000-0079f000 r-xp 00000000 fd:00 7701896 /opt/airwave/lib/perl5/5.10.0/i386-linux-thread-multi/CORE/libperl.so 0079f000-007a4000 rw-p 00249000 fd:00 7701896 /opt/airwave/lib/perl5/5.10.0/i386-linux-thread-multi/CORE/libperl.so 00a14000-00a15000 r-xp 00a14000 00:00 0 [vdso] 08048000-08049000 r-xp 00000000 fd:00 7471815 /opt/airwave/bin/perl 08049000-0804a000 rw-p 00000000 fd:00 7471815 /opt/airwave/bin/perl 0984e000-098d1000 rw-p 0984e000 00:00 0 b7c00000-b7c21000 rw-p b7c00000 00:00 0 b7c21000-b7d00000 ---p b7c21000 00:00 0 b7db8000-b7db9000 r--p 01934000 fd:00 5445987 /usr/lib/locale/locale-archive b7db9000-b7dbf000 r--p 018bf000 fd:00 5445987 /usr/lib/locale/locale-archive b7dbf000-b7df3000 r--p 01887000 fd:00 5445987 /usr/lib/locale/locale-archive b7df3000-b7ff3000 r--p 00000000 fd:00 5445987 /usr/lib/locale/locale-archive b7ff3000-b7ff6000 rw-p b7ff3000 00:00 0 b7ffc000-b7ffd000 rw-p b7ffc000 00:00 0 bfe82000-bfe98000 rw-p bfe82000 00:00 0 [stack]
Subject: crypt-des-crash.pl
#!/usr/bin/perl use strict; use warnings; use Crypt::DES; my $cipher = Crypt::DES->new(pack('H*', '1234567812345678')); my %hash = ( '12345678' => '12345678', ); # crashes my ($k) = keys %hash; $cipher->encrypt($k); # works $cipher->encrypt("$k"); # works my ($v) = values %hash; $cipher->encrypt($v);
Subject: Crypt::DES oddity under 5.10.0
Please include the output of perl -V (capitalized) so this may be analyzed on appropriate hardware. Thank you, -dsp (a-mused)
Subject: perl -V output
From: twhaples [...] airwave.com
On Fri Aug 08 06:10:26 2008, DPARIS wrote: Show quoted text
> Please include the output of perl -V (capitalized) so this may be > analyzed on appropriate > hardware. > > Thank you, > -dsp (a-mused)
Summary of my perl5 (revision 5 version 10 subversion 0) configuration: Platform: osname=linux, osvers=2.6.9-42.0.3.elsmp, archname=i386-linux-thread-multi uname='linux cent4-rpmbuild.dev.airwave.com 2.6.9-42.0.3.elsmp #1 smp fri oct 6 06:21:39 cdt 2006 i686 i686 i386 gnulinux ' config_args='-des -Doptimize=-O2 -g -march=i386 -mcpu=i686 -Dversion=5.10.0 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/opt/airwave -Dprefix=/opt/airwave -Dprivlib=/opt/airwave/lib/perl5/5.10.0 -Dsitelib=/opt/airwave/local/lib/perl5/site_perl/5.10.0 -Dvendorlib=/opt/airwave/lib/perl5/vendor_perl/5.10.0 -Darchlib=/opt/airwave/lib/perl5/5.10.0/i386-linux-thread-multi -Dsitearch=/opt/airwave/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi -Dvendorarch=/opt/airwave/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi -Darchname=i386-linux-thread-multi -Dvendorprefix=/opt/airwave -Dsiteprefix=/opt/airwave/local -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto -Dscriptdir=/opt/airwave/bin' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-O2 -g -march=i386 -mcpu=i686', cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm' ccversion='', gccversion='3.4.6 20060404 (Red Hat 3.4.6-9)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.3.4.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.3.4' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/opt/airwave/lib/perl5/5.10.0/i386-linux-thread-multi/CORE' cccdlflags='-fPIC', lddlflags='-shared -O2 -g -march=i386 -mcpu=i686 -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: DEBUGGING MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_TRACK_MEMPOOL USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Built under linux Compiled at Jun 30 2008 15:26:47 %ENV: PERL5LIB="/root/svn/mercury/common/lib/perl:/root/svn/mercury/lib/perl:/root/svn/devtoys/rally/lib:/root/svn/devtoys/bug_emails" @INC: /root/svn/mercury/common/lib/perl /root/svn/mercury/lib/perl /root/svn/devtoys/rally/lib /root/svn/devtoys/bug_emails /opt/airwave/lib/perl5/5.10.0/i386-linux-thread-multi /opt/airwave/lib/perl5/5.10.0 /opt/airwave/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi /opt/airwave/local/lib/perl5/site_perl/5.10.0 /opt/airwave/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi /opt/airwave/lib/perl5/vendor_perl/5.10.0 /opt/airwave/lib/perl5/vendor_perl .
Unable to duplicate error. Rejecting ticket. Please resubmit if you still cannot accomplish this.