Skip Menu |

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

Report information
The Basics
Id: 26703
Status: resolved
Priority: 0/
Queue: Crypt-GpgME

People
Owner: rafl [...] debian.org
Requestors: artur+perl.org [...] niif.spb.su
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.01
Fixed in: (no value)



Subject: Coredump in Crypt::GpgME
# uname -a Linux dhcp-80.cs-intra.net 2.6.20-1.2933.fc6 #1 SMP Mon Mar 19 11:38:26 EDT 2007 i686 i686 i386 GNU/Linux # perl -v This is perl, v5.8.8 built for i386-linux-thread-multi ... # rpm -q gpgme gpgme-1.1.4-1.fc6 # perl -MCrypt::GpgME -MIO::File -e '$ctx = Crypt::GpgME->new; $ctx->set_passphrase_cb(sub { "abc" }); $signed = $ctx->sign( IO::File->new($ARGV[0], "r") ); print while <$signed>;' /etc/passwd zsh: 14401 segmentation fault (core dumped) perl -MCrypt::GpgME -MIO::File -e /etc/passwd # gdb =perl core.14401 ... warning: Can't read pathname for load map: Input/output error. Reading symbols from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so...(no debugging symbols found)...done. Loaded symbols for /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so Reading symbols from /lib/libresolv.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libresolv.so.2 Reading symbols from /lib/libnsl.so.1... (no debugging symbols found)...done. Loaded symbols for /lib/libnsl.so.1 Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/libm.so.6... (no debugging symbols found)...done. Loaded symbols for /lib/libm.so.6 Reading symbols from /lib/libcrypt.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libcrypt.so.1 Reading symbols from /lib/libutil.so.1... (no debugging symbols found)...done. Loaded symbols for /lib/libutil.so.1 Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done. Loaded symbols for /lib/libpthread.so.0 Reading symbols from /lib/libc.so.6... (no debugging symbols found)...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/IO/IO.so...done. Loaded symbols for /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/IO/IO.so Reading symbols from /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/Crypt/GpgME/GpgME.so...done. Loaded symbols for /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/Crypt/GpgME/GpgME.so Reading symbols from /usr/lib/libgpgme.so.11...done. Loaded symbols for /usr/lib/libgpgme.so.11 Reading symbols from /usr/lib/libgpg-error.so.0...done. Loaded symbols for /usr/lib/libgpg-error.so.0 Reading symbols from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/Fcntl/Fcntl.so...done. Loaded symbols for /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/Fcntl/Fcntl.so Core was generated by `perl -MCrypt::GpgME -MIO::File -e $ctx = Crypt::GpgME->new; $ctx->set_passphras'. Program terminated with signal 11, Segmentation fault. #0 0x00427473 in strlen () from /lib/libc.so.6 (gdb) ^D core file attached
Subject: core.14401
Download core.14401
application/octet-stream 1.4m

Message body not shown because it is not plain text.

On Do. 26. Apr. 2007, 03:54:43, ARTO wrote: Show quoted text
> # uname -a > Linux dhcp-80.cs-intra.net 2.6.20-1.2933.fc6 #1 SMP Mon Mar 19 > 11:38:26 > EDT 2007 i686 i686 i386 GNU/Linux > # perl -v > This is perl, v5.8.8 built for i386-linux-thread-multi > ... > # rpm -q gpgme > gpgme-1.1.4-1.fc6 > # perl -MCrypt::GpgME -MIO::File -e '$ctx = Crypt::GpgME->new; > $ctx->set_passphrase_cb(sub { "abc" }); $signed = $ctx->sign( > IO::File->new($ARGV[0], "r") ); print while <$signed>;' /etc/passwd > zsh: 14401 segmentation fault (core dumped) perl -MCrypt::GpgME > -MIO::File -e /etc/passwd > # gdb =perl core.14401 > ... > warning: Can't read pathname for load map: Input/output error. > Reading symbols from > /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so...(no > debugging symbols found)...done. > Loaded symbols for > /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so > Reading symbols from /lib/libresolv.so.2...(no debugging symbols > found)...done. > Loaded symbols for /lib/libresolv.so.2 > Reading symbols from /lib/libnsl.so.1... > (no debugging symbols found)...done. > Loaded symbols for /lib/libnsl.so.1 > Reading symbols from /lib/libdl.so.2...(no debugging symbols > found)...done. > Loaded symbols for /lib/libdl.so.2 > Reading symbols from /lib/libm.so.6... > (no debugging symbols found)...done. > Loaded symbols for /lib/libm.so.6 > Reading symbols from /lib/libcrypt.so.1...(no debugging symbols > found)...done. > Loaded symbols for /lib/libcrypt.so.1 > Reading symbols from /lib/libutil.so.1... > (no debugging symbols found)...done. > Loaded symbols for /lib/libutil.so.1 > Reading symbols from /lib/libpthread.so.0...(no debugging symbols > found)...done. > Loaded symbols for /lib/libpthread.so.0 > Reading symbols from /lib/libc.so.6... > (no debugging symbols found)...done. > Loaded symbols for /lib/libc.so.6 > Reading symbols from /lib/ld-linux.so.2...(no debugging symbols > found)...done. > Loaded symbols for /lib/ld-linux.so.2 > Reading symbols from > /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/IO/IO.so...done. > Loaded symbols for > /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/IO/IO.so > Reading symbols from > /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread- > multi/auto/Crypt/GpgME/GpgME.so...done. > Loaded symbols for > /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread- > multi/auto/Crypt/GpgME/GpgME.so > Reading symbols from /usr/lib/libgpgme.so.11...done. > Loaded symbols for /usr/lib/libgpgme.so.11 > Reading symbols from /usr/lib/libgpg-error.so.0...done. > Loaded symbols for /usr/lib/libgpg-error.so.0 > Reading symbols from > /usr/lib/perl5/5.8.8/i386-linux-thread- > multi/auto/Fcntl/Fcntl.so...done. > Loaded symbols for > /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/Fcntl/Fcntl.so > > Core was generated by `perl -MCrypt::GpgME -MIO::File -e $ctx = > Crypt::GpgME->new; $ctx->set_passphras'. > Program terminated with signal 11, Segmentation fault. > #0 0x00427473 in strlen () from /lib/libc.so.6 > (gdb) ^D > > core file attached
Somehow your core file doesn't quite work for me. At least it doesn' tell me that it failed in strlen(). Therefor I'm asking you for the output of bt full from within gdb after the coredump occured. TIA, Flo
Subject: Re: [rt.cpan.org #26703] Coredump in Crypt::GpgME
Date: Fri, 27 Apr 2007 17:54:16 +0400
To: bug-Crypt-GpgME [...] rt.cpan.org
From: Artur Penttinen <arto-p [...] yandex.ru>
27.04.07, 17:23, Florian Ragwitz via RT <bug-Crypt-GpgME@rt.cpan.org>: [...] Show quoted text
> Somehow your core file doesn't quite work for me. At least it doesn' > tell me that it failed in strlen(). Therefor I'm asking you for the > output of bt full from within gdb after the coredump occured.
sorry, (gdb) bt #0 0x00427473 in strlen () from /lib/libc.so.6 #1 0x006afd5f in Perl_newSVpv () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #2 0x4028e551 in perl_gpgme_data_to_sv (data=0x9e80328) at perl_glue/perl_gpgme_data.c:196 #3 0x40281cfc in XS_Crypt__GpgME_sign (my_perl=0x9d7f008, cv=0x9e3cd80) at xs/GpgME.c:1057 #4 0x006a751d in Perl_pp_entersub () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #5 0x006a097f in Perl_runops_standard () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #6 0x006461ce in perl_run () from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so #7 0x080491ee in main () -- wbw, artur
On Fr. 27. Apr. 2007, 09:54:49, artur@niif.spb.su wrote: Show quoted text
> 27.04.07, 17:23, Florian Ragwitz via RT <bug-Crypt-GpgME@rt.cpan.org>: > > [...]
> > Somehow your core file doesn't quite work for me. At least it doesn' > > tell me that it failed in strlen(). Therefor I'm asking you for the > > output of bt full from within gdb after the coredump occured.
> > sorry, > > (gdb) bt > #0 0x00427473 in strlen () from /lib/libc.so.6 > #1 0x006afd5f in Perl_newSVpv () > from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so > #2 0x4028e551 in perl_gpgme_data_to_sv (data=0x9e80328) > at perl_glue/perl_gpgme_data.c:196 > #3 0x40281cfc in XS_Crypt__GpgME_sign (my_perl=0x9d7f008, cv=0x9e3cd80) > at xs/GpgME.c:1057 > #4 0x006a751d in Perl_pp_entersub () > from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so > #5 0x006a097f in Perl_runops_standard () > from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so > #6 0x006461ce in perl_run () > from /usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE/libperl.so > #7 0x080491ee in main () >
ok.. this seems to indicate that gpgme_data_release_and_get_mem returns a NULL pointer. Please tell gdb to set a breakpoint at perl_gpgme_data_to_sv and tell me what the values of buf and len are before and after the call to gpgme_data_release_and_get_mem. -Flo
I just tested the latest release (0.02) against your version of libgpgme (1.1.4). The test suite as well as the snippet that is causing your problem worked fine. What version of gpgme are you using? Except for that I don't have an idea what might be wrong unless you can provide some more debugging information. -Flo
Subject: Re: [rt.cpan.org #26703] Coredump in Crypt::GpgME
Date: Mon, 30 Apr 2007 09:16:48 +0400
To: bug-Crypt-GpgME [...] rt.cpan.org
From: Artur Penttinen <arto-p [...] yandex.ru>
30.04.07, 00:19, Florian Ragwitz via RT <bug-Crypt-GpgME@rt.cpan.org>: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=26703 > > I just tested the latest release (0.02) against your version of libgpgme > (1.1.4). The test suite as well as the snippet that is causing your > problem worked fine. > What version of gpgme are you using? Except for that I don't have an > idea what might be wrong unless you can provide some more debugging > information.
# gpgme-config --version 1.1.4 New wersion generate core too :( This proto-patch helps for me: diff -Bbu perl_glue/perl_gpgme_data.c{.orig,} --- perl_glue/perl_gpgme_data.c.orig 2007-04-30 08:14:55.000000000 +0300 +++ perl_glue/perl_gpgme_data.c 2007-04-30 08:15:21.000000000 +0300 @@ -193,7 +193,7 @@ gpgme_data_seek (data, 0, SEEK_SET); buf = gpgme_data_release_and_get_mem (data, &len); - buffer = newSVpv (buf, len); + buffer = newSVpv (buf, len==0?1:len); gpgme_free (buf); ENTER; -- wbw, artur
I'm quite certain that this issue has been fixed with version 0.03 although the reporter didn't confirm it. Feel free to reopen if the bug still applies.