Skip Menu |

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

Report information
The Basics
Id: 42132
Status: resolved
Priority: 0/
Queue: Compress-unLZMA

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc: JNW [...] cpan.org
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 0.02
  • 0.03
Fixed in: 0.04



Subject: SEGV on 64 bit systems
While watching FAILs on cpantesters site I discovered a perfect correlation between Compress-unLZMA-0.02 FAILs and 64bit systems like alpha and amd64/x86_64. I have then reproduced on my own x86_64. The stack trace after the SEGV looks like so: Core was generated by `/usr/local/perl-5.10-g/bin/perl -w t/Compress-unLZMA.t'. Program terminated with signal 11, Segmentation fault. [New process 7268] #0 0x00002ada208f8f2c in LzmaDecode () from /home/sand/.cpan/build/Compress-unLZMA-0.02-BXelFy/blib/arch/auto/Compress/unLZMA/unLZMA.so (gdb) bt #0 0x00002ada208f8f2c in LzmaDecode () from /home/sand/.cpan/build/Compress-unLZMA-0.02-BXelFy/blib/arch/auto/Compress/unLZMA/unLZMA.so #1 0x00002ada208f97cb in LzmaUncompressData () from /home/sand/.cpan/build/Compress-unLZMA-0.02-BXelFy/blib/arch/auto/Compress/unLZMA/unLZMA.so #2 0x00002ada208f9d93 in LzmaUncompressFile () from /home/sand/.cpan/build/Compress-unLZMA-0.02-BXelFy/blib/arch/auto/Compress/unLZMA/unLZMA.so #3 0x00002ada208fa080 in XS_Compress__unLZMA_uncompressfile () from /home/sand/.cpan/build/Compress-unLZMA-0.02-BXelFy/blib/arch/auto/Compress/unLZMA/unLZMA.so #4 0x0000000000465f8a in Perl_pp_entersub () #5 0x00000000004645b2 in Perl_runops_standard () #6 0x0000000000460bcf in perl_run () #7 0x000000000041f5bc in main () Let me know if you'd need further infos. Regards,
the attached patch fixes this. Using sizeof(struct LzmaVarState) instead of hardcoded 100. v0.03 is available (including my patch) from http://software.opensuse.org/search?q=perl-Compress-unLZMA
Subject: survive_64bit.patch
--- Compress-unLZMA-0.03/unLZMA.xs.orig 2009-04-19 15:40:57.000000000 +0200 +++ Compress-unLZMA-0.03/unLZMA.xs 2010-07-06 19:53:26.342873000 +0200 @@ -59,9 +59,10 @@ int LzmaUncompressData(Content *pIn, Con lzmaInternalSize = (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp)))* sizeof(CProb); - #ifdef _LZMA_OUT_READ - lzmaInternalSize += 100; - #endif +#ifdef _LZMA_OUT_READ + // lzmaInternalSize += 100; // good for 32bit systems only. jw@suse.de + lzmaInternalSize += sizeof(LzmaVarState); +#endif New(0, pOut->content, pOut->size, char); if (pOut->content == 0)
On Tue Jul 06 14:10:03 2010, JNW wrote: Show quoted text
> the attached patch fixes this.
Thank you very much, Jurgen and Andreas. Sorry for making you wait for so long. Compress-unLZMA-0.04 is on its way to CPAN.