Skip Menu |

This queue is for tickets about the Compress-Bzip2 CPAN distribution.

Report information
The Basics
Id: 28366
Status: resolved
Priority: 0/
Queue: Compress-Bzip2

People
Owner: RURBAN [...] cpan.org
Requestors: mat.free [...] free.fr
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.09
Fixed in: (no value)



Subject: glibc detected *** double free or corruption with bzreadline
Hi, I have a strange problem using Compress-Bzip2 2.09 My example is very basic, and run correctly must of the time. But on particular files (you have one in attachement), I get : *** glibc detected *** double free or corruption (!prev): 0x08232f98 *** only on 32-bits architecture. #!/usr/bin/perl -w use strict; use Compress::Bzip2 ; my $bz = bzopen ('new.bz2', 'rb') ; print "a"; while ($bz->bzreadline($_) > 0) {} $bz->bzclose () ; If I only delete the "print" line, the error disappear ! If I use bzread instead of bzreadline, the error also disappear ! Versions : - perl, v5.8.8 built for i486-linux-gnu-thread-multi - Compress-Bzip2 2.09 - Linux sd-xxxx 2.6.18.1dedibox_r6_final #1 Mon Oct 16 14:05:25 CEST 2006 i686 GNU/Linux thks!
On Wed Jul 18 12:02:25 2007, freemat wrote: Show quoted text
> I have a strange problem using Compress-Bzip2 2.09 > > My example is very basic, and run correctly must of the time. > > But on particular files (you have one in attachement), I get : > > *** glibc detected *** double free or corruption (!prev): 0x08232f98 *** > > only on 32-bits architecture. > > #!/usr/bin/perl -w > > use strict; > use Compress::Bzip2 ; > > my $bz = bzopen ('new.bz2', 'rb') ; > print "a"; > while ($bz->bzreadline($_) > 0) {} > $bz->bzclose () ; > > If I only delete the "print" line, the error disappear ! > If I use bzread instead of bzreadline, the error also disappear ! > > Versions : > - perl, v5.8.8 built for i486-linux-gnu-thread-multi > - Compress-Bzip2 2.09 > - Linux sd-xxxx 2.6.18.1dedibox_r6_final #1 Mon Oct 16 14:05:25 CEST > 2006 i686 GNU/Linux > > thks!
I've added a testcase but could not repro it. (valgrind+asan, various perl versions threaded/unthreaded) See https://github.com/rurban/Compress-Bzip2/commit/886cf829428ff21853964fc47414788db39115a6 -- Reini Urban
With the testcase in the public, no cpan tester tripped over it since. -- Reini Urban