Skip Menu |

This queue is for tickets about the Scalar-List-Utils CPAN distribution.

Report information
The Basics
Id: 111211
Status: rejected
Priority: 0/
Queue: Scalar-List-Utils

Owner: Nobody in particular
Requestors: NWELLNHOF [...]

Bug Information
Severity: Important
Broken in:
  • 1.38
  • 1.42
Fixed in: (no value)

Subject: Calling shuffle causes crash during global destruction
Download (untitled) / with headers
text/plain 2.2k
When run with PERL_DESTRUCT_LEVEL=2, the following simple program segfaults during global destruction: use strict; use warnings; use List::Util qw( shuffle ); print "Using List::Util $List::Util::VERSION\n"; my @orig = ( 'a' .. 'z' ); shuffle(@orig); It looks like it has something to do with the calls to seedDrand01 and Drand01. I'm using the debug version of the stock Perl 5.20.2 shipped with Ubuntu 15.04 (vivid). Valgrind output: $ PERL_DESTRUCT_LEVEL=2 valgrind debugperl ==5457== Memcheck, a memory error detector ==5457== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==5457== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info ==5457== Command: debugperl ==5457== Using List::Util 1.42 ==5457== Invalid read of size 4 ==5457== at 0x808578C: S_SvREFCNT_dec (inline.h:119) ==5457== by 0x808578C: perl_destruct (perl.c:1139) ==5457== by 0x805F5E4: main (perlmain.c:125) ==5457== Address 0xf297b03d is not stack'd, malloc'd or (recently) free'd ==5457== ==5457== ==5457== Process terminating with default action of signal 11 (SIGSEGV) ==5457== Access not within mapped region at address 0xF297B03D ==5457== at 0x808578C: S_SvREFCNT_dec (inline.h:119) ==5457== by 0x808578C: perl_destruct (perl.c:1139) ==5457== by 0x805F5E4: main (perlmain.c:125) ==5457== If you believe this happened as a result of a stack ==5457== overflow in your program's main thread (unlikely but ==5457== possible), you can try to increase the size of the ==5457== main thread stack using the --main-stacksize= flag. ==5457== The main thread stack size used in this run was 8388608. ==5457== ==5457== HEAP SUMMARY: ==5457== in use at exit: 195,340 bytes in 83 blocks ==5457== total heap usage: 5,798 allocs, 5,715 frees, 759,072 bytes allocated ==5457== ==5457== LEAK SUMMARY: ==5457== definitely lost: 0 bytes in 0 blocks ==5457== indirectly lost: 0 bytes in 0 blocks ==5457== possibly lost: 0 bytes in 0 blocks ==5457== still reachable: 195,340 bytes in 83 blocks ==5457== suppressed: 0 bytes in 0 blocks ==5457== Rerun with --leak-check=full to see details of leaked memory ==5457== ==5457== For counts of detected and suppressed errors, rerun with: -v ==5457== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) Segmentation fault
Download (untitled) / with headers
text/plain 134b
Further investigation showed that this is a problem with Debian's debugperl:

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to