develooper Front page | perl.perl5.porters | Postings from July 2016

[perl #39358] sort with custom subname and prototype ($$) segfaultsintermittently

From:
Dan Collins via RT
Date:
July 12, 2016 16:18
Subject:
[perl #39358] sort with custom subname and prototype ($$) segfaultsintermittently
Message ID:
rt-4.0.18-2262-1468340299-1825.39358-14-0@perl.org
Some research into the history of this testcase: Until 5.11.5, this was fine on the perls I'm able to build. In 5.11.5, it started throwing a segfault, in 5.13.4 this became a libc "aborted", in 5.17.10, it segfaulted again, and in 5.19.1, 5.19.3, and all later versions, it is fine EXCEPT for -thread-multi-debug builds, which still amazingly manage to kill libc:

    *** Error in `perl5.25.2-thread-multi-debug': free(): invalid next size (fast): 0x0000000000b1cd80 ***
    ======= Backtrace: =========
    /lib/x86_64-linux-gnu/libc.so.6(+0x71fc5)[0x7fa577634fc5]
    /lib/x86_64-linux-gnu/libc.so.6(+0x77966)[0x7fa57763a966]
    /lib/x86_64-linux-gnu/libc.so.6(+0x7814e)[0x7fa57763b14e]
    perl5.25.2-thread-multi-debug(perl_free+0x59)[0x4503e9]
    perl5.25.2-thread-multi-debug(main+0x101)[0x41dbd1]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7fa5775e35f0]
    perl5.25.2-thread-multi-debug(_start+0x29)[0x41dc49]

Valgrind is very disappointed:

    ==37049== Invalid read of size 4
    ==37049==    at 0x542901: Perl_pp_aelem (pp_hot.c:4023)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x66A8B5: S_sortcv_stacked (pp_sort.c:1830)
    ==37049==    by 0x6688D4: S_mergesortsv (pp_sort.c:427)
    ==37049==    by 0x66DF43: Perl_sortsv_flags (pp_sort.c:1464)
    ==37049==    by 0x66DF43: Perl_pp_sort (pp_sort.c:1694)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==  Address 0x5f891d4 is 12 bytes after a block of size 56 alloc'd
    ==37049==    at 0x4C28C0F: malloc (vg_replace_malloc.c:299)
    ==37049==    by 0x4FE7F8: Perl_safesysmalloc (util.c:153)
    ==37049==    by 0x52EC85: Perl_av_extend_guts (av.c:186)
    ==37049==    by 0x536617: Perl_pp_aassign (pp_hot.c:1375)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==
    ==37049== Invalid read of size 4
    ==37049==    at 0x568C31: Perl_sv_2iv_flags (sv.c:2415)
    ==37049==    by 0x542925: Perl_pp_aelem (pp_hot.c:4023)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x66A8B5: S_sortcv_stacked (pp_sort.c:1830)
    ==37049==    by 0x6688D4: S_mergesortsv (pp_sort.c:427)
    ==37049==    by 0x66DF43: Perl_sortsv_flags (pp_sort.c:1464)
    ==37049==    by 0x66DF43: Perl_pp_sort (pp_sort.c:1694)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==  Address 0x5f891d4 is 12 bytes after a block of size 56 alloc'd
    ==37049==    at 0x4C28C0F: malloc (vg_replace_malloc.c:299)
    ==37049==    by 0x4FE7F8: Perl_safesysmalloc (util.c:153)
    ==37049==    by 0x52EC85: Perl_av_extend_guts (av.c:186)
    ==37049==    by 0x536617: Perl_pp_aassign (pp_hot.c:1375)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==
    ==37049== Invalid read of size 4
    ==37049==    at 0x567457: S_sv_2iuv_common (sv.c:2128)
    ==37049==    by 0x56924A: Perl_sv_2iv_flags (sv.c:2487)
    ==37049==    by 0x542925: Perl_pp_aelem (pp_hot.c:4023)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x66A8B5: S_sortcv_stacked (pp_sort.c:1830)
    ==37049==    by 0x6688D4: S_mergesortsv (pp_sort.c:427)
    ==37049==    by 0x66DF43: Perl_sortsv_flags (pp_sort.c:1464)
    ==37049==    by 0x66DF43: Perl_pp_sort (pp_sort.c:1694)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==  Address 0x5f891d4 is 12 bytes after a block of size 56 alloc'd
    ==37049==    at 0x4C28C0F: malloc (vg_replace_malloc.c:299)
    ==37049==    by 0x4FE7F8: Perl_safesysmalloc (util.c:153)
    ==37049==    by 0x52EC85: Perl_av_extend_guts (av.c:186)
    ==37049==    by 0x536617: Perl_pp_aassign (pp_hot.c:1375)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==
    Use of uninitialized value $match_indices[2] in array element at 39358.pl line 10.
    ==37049== Invalid read of size 4
    ==37049==    at 0x567A9D: S_sv_2iuv_common (sv.c:2389)
    ==37049==    by 0x56924A: Perl_sv_2iv_flags (sv.c:2487)
    ==37049==    by 0x542925: Perl_pp_aelem (pp_hot.c:4023)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x66A8B5: S_sortcv_stacked (pp_sort.c:1830)
    ==37049==    by 0x6688D4: S_mergesortsv (pp_sort.c:427)
    ==37049==    by 0x66DF43: Perl_sortsv_flags (pp_sort.c:1464)
    ==37049==    by 0x66DF43: Perl_pp_sort (pp_sort.c:1694)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==  Address 0x5f891d4 is 12 bytes after a block of size 56 alloc'd
    ==37049==    at 0x4C28C0F: malloc (vg_replace_malloc.c:299)
    ==37049==    by 0x4FE7F8: Perl_safesysmalloc (util.c:153)
    ==37049==    by 0x52EC85: Perl_av_extend_guts (av.c:186)
    ==37049==    by 0x536617: Perl_pp_aassign (pp_hot.c:1375)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==
    ==37049== Invalid read of size 4
    ==37049==    at 0x55AF00: Perl_sv_upgrade (sv.c:1204)
    ==37049==    by 0x56796D: S_sv_2iuv_common (sv.c:2393)
    ==37049==    by 0x56924A: Perl_sv_2iv_flags (sv.c:2487)
    ==37049==    by 0x542925: Perl_pp_aelem (pp_hot.c:4023)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x66A8B5: S_sortcv_stacked (pp_sort.c:1830)
    ==37049==    by 0x6688D4: S_mergesortsv (pp_sort.c:427)
    ==37049==    by 0x66DF43: Perl_sortsv_flags (pp_sort.c:1464)
    ==37049==    by 0x66DF43: Perl_pp_sort (pp_sort.c:1694)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==  Address 0x5f891d4 is 12 bytes after a block of size 56 alloc'd
    ==37049==    at 0x4C28C0F: malloc (vg_replace_malloc.c:299)
    ==37049==    by 0x4FE7F8: Perl_safesysmalloc (util.c:153)
    ==37049==    by 0x52EC85: Perl_av_extend_guts (av.c:186)
    ==37049==    by 0x536617: Perl_pp_aassign (pp_hot.c:1375)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==
    ==37049== Invalid read of size 8
    ==37049==    at 0x55AF3F: Perl_sv_upgrade (sv.c:1228)
    ==37049==    by 0x56796D: S_sv_2iuv_common (sv.c:2393)
    ==37049==    by 0x56924A: Perl_sv_2iv_flags (sv.c:2487)
    ==37049==    by 0x542925: Perl_pp_aelem (pp_hot.c:4023)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x66A8B5: S_sortcv_stacked (pp_sort.c:1830)
    ==37049==    by 0x6688D4: S_mergesortsv (pp_sort.c:427)
    ==37049==    by 0x66DF43: Perl_sortsv_flags (pp_sort.c:1464)
    ==37049==    by 0x66DF43: Perl_pp_sort (pp_sort.c:1694)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==  Address 0x5f891c8 is 0 bytes after a block of size 56 alloc'd
    ==37049==    at 0x4C28C0F: malloc (vg_replace_malloc.c:299)
    ==37049==    by 0x4FE7F8: Perl_safesysmalloc (util.c:153)
    ==37049==    by 0x52EC85: Perl_av_extend_guts (av.c:186)
    ==37049==    by 0x536617: Perl_pp_aassign (pp_hot.c:1375)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==
    ==37049== Invalid read of size 4
    ==37049==    at 0x55AFD9: Perl_sv_upgrade (sv.c:1316)
    ==37049==    by 0x56796D: S_sv_2iuv_common (sv.c:2393)
    ==37049==    by 0x56924A: Perl_sv_2iv_flags (sv.c:2487)
    ==37049==    by 0x542925: Perl_pp_aelem (pp_hot.c:4023)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x66A8B5: S_sortcv_stacked (pp_sort.c:1830)
    ==37049==    by 0x6688D4: S_mergesortsv (pp_sort.c:427)
    ==37049==    by 0x66DF43: Perl_sortsv_flags (pp_sort.c:1464)
    ==37049==    by 0x66DF43: Perl_pp_sort (pp_sort.c:1694)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==  Address 0x5f891d4 is 12 bytes after a block of size 56 alloc'd
    ==37049==    at 0x4C28C0F: malloc (vg_replace_malloc.c:299)
    ==37049==    by 0x4FE7F8: Perl_safesysmalloc (util.c:153)
    ==37049==    by 0x52EC85: Perl_av_extend_guts (av.c:186)
    ==37049==    by 0x536617: Perl_pp_aassign (pp_hot.c:1375)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==
    ==37049== Invalid write of size 4
    ==37049==    at 0x55AFF3: Perl_sv_upgrade (sv.c:1317)
    ==37049==    by 0x56796D: S_sv_2iuv_common (sv.c:2393)
    ==37049==    by 0x56924A: Perl_sv_2iv_flags (sv.c:2487)
    ==37049==    by 0x542925: Perl_pp_aelem (pp_hot.c:4023)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x66A8B5: S_sortcv_stacked (pp_sort.c:1830)
    ==37049==    by 0x6688D4: S_mergesortsv (pp_sort.c:427)
    ==37049==    by 0x66DF43: Perl_sortsv_flags (pp_sort.c:1464)
    ==37049==    by 0x66DF43: Perl_pp_sort (pp_sort.c:1694)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==  Address 0x5f891d4 is 12 bytes after a block of size 56 alloc'd
    ==37049==    at 0x4C28C0F: malloc (vg_replace_malloc.c:299)
    ==37049==    by 0x4FE7F8: Perl_safesysmalloc (util.c:153)
    ==37049==    by 0x52EC85: Perl_av_extend_guts (av.c:186)
    ==37049==    by 0x536617: Perl_pp_aassign (pp_hot.c:1375)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==
    ==37049== Invalid write of size 8
    ==37049==    at 0x55B0CD: Perl_sv_upgrade (sv.c:1325)
    ==37049==    by 0x56796D: S_sv_2iuv_common (sv.c:2393)
    ==37049==    by 0x56924A: Perl_sv_2iv_flags (sv.c:2487)
    ==37049==    by 0x542925: Perl_pp_aelem (pp_hot.c:4023)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x66A8B5: S_sortcv_stacked (pp_sort.c:1830)
    ==37049==    by 0x6688D4: S_mergesortsv (pp_sort.c:427)
    ==37049==    by 0x66DF43: Perl_sortsv_flags (pp_sort.c:1464)
    ==37049==    by 0x66DF43: Perl_pp_sort (pp_sort.c:1694)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==  Address 0x5f891c8 is 0 bytes after a block of size 56 alloc'd
    ==37049==    at 0x4C28C0F: malloc (vg_replace_malloc.c:299)
    ==37049==    by 0x4FE7F8: Perl_safesysmalloc (util.c:153)
    ==37049==    by 0x52EC85: Perl_av_extend_guts (av.c:186)
    ==37049==    by 0x536617: Perl_pp_aassign (pp_hot.c:1375)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==
    ==37049== Invalid write of size 8
    ==37049==    at 0x55B0F7: Perl_sv_upgrade (sv.c:1326)
    ==37049==    by 0x56796D: S_sv_2iuv_common (sv.c:2393)
    ==37049==    by 0x56924A: Perl_sv_2iv_flags (sv.c:2487)
    ==37049==    by 0x542925: Perl_pp_aelem (pp_hot.c:4023)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x66A8B5: S_sortcv_stacked (pp_sort.c:1830)
    ==37049==    by 0x6688D4: S_mergesortsv (pp_sort.c:427)
    ==37049==    by 0x66DF43: Perl_sortsv_flags (pp_sort.c:1464)
    ==37049==    by 0x66DF43: Perl_pp_sort (pp_sort.c:1694)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==  Address 0x5f891d8 is 16 bytes after a block of size 56 alloc'd
    ==37049==    at 0x4C28C0F: malloc (vg_replace_malloc.c:299)
    ==37049==    by 0x4FE7F8: Perl_safesysmalloc (util.c:153)
    ==37049==    by 0x52EC85: Perl_av_extend_guts (av.c:186)
    ==37049==    by 0x536617: Perl_pp_aassign (pp_hot.c:1375)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==
    ==37049== Invalid read of size 4
    ==37049==    at 0x542952: Perl_pp_aelem (pp_hot.c:4031)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x66A8B5: S_sortcv_stacked (pp_sort.c:1830)
    ==37049==    by 0x6688D4: S_mergesortsv (pp_sort.c:427)
    ==37049==    by 0x66DF43: Perl_sortsv_flags (pp_sort.c:1464)
    ==37049==    by 0x66DF43: Perl_pp_sort (pp_sort.c:1694)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==  Address 0x5f891d4 is 12 bytes after a block of size 56 alloc'd
    ==37049==    at 0x4C28C0F: malloc (vg_replace_malloc.c:299)
    ==37049==    by 0x4FE7F8: Perl_safesysmalloc (util.c:153)
    ==37049==    by 0x52EC85: Perl_av_extend_guts (av.c:186)
    ==37049==    by 0x536617: Perl_pp_aassign (pp_hot.c:1375)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==
    ==37049== Invalid read of size 4
    ==37049==    at 0x542901: Perl_pp_aelem (pp_hot.c:4023)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x66A8B5: S_sortcv_stacked (pp_sort.c:1830)
    ==37049==    by 0x668926: S_mergesortsv (pp_sort.c:450)
    ==37049==    by 0x66DF43: Perl_sortsv_flags (pp_sort.c:1464)
    ==37049==    by 0x66DF43: Perl_pp_sort (pp_sort.c:1694)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==  Address 0x5f891d4 is 12 bytes after a block of size 56 alloc'd
    ==37049==    at 0x4C28C0F: malloc (vg_replace_malloc.c:299)
    ==37049==    by 0x4FE7F8: Perl_safesysmalloc (util.c:153)
    ==37049==    by 0x52EC85: Perl_av_extend_guts (av.c:186)
    ==37049==    by 0x536617: Perl_pp_aassign (pp_hot.c:1375)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==
    Use of uninitialized value $match_indices[2] in array element at 39358.pl line 10.
    ==37049== Invalid read of size 4
    ==37049==    at 0x542952: Perl_pp_aelem (pp_hot.c:4031)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x66A8B5: S_sortcv_stacked (pp_sort.c:1830)
    ==37049==    by 0x668926: S_mergesortsv (pp_sort.c:450)
    ==37049==    by 0x66DF43: Perl_sortsv_flags (pp_sort.c:1464)
    ==37049==    by 0x66DF43: Perl_pp_sort (pp_sort.c:1694)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==  Address 0x5f891d4 is 12 bytes after a block of size 56 alloc'd
    ==37049==    at 0x4C28C0F: malloc (vg_replace_malloc.c:299)
    ==37049==    by 0x4FE7F8: Perl_safesysmalloc (util.c:153)
    ==37049==    by 0x52EC85: Perl_av_extend_guts (av.c:186)
    ==37049==    by 0x536617: Perl_pp_aassign (pp_hot.c:1375)
    ==37049==    by 0x4FC479: Perl_runops_debug (dump.c:2239)
    ==37049==    by 0x45BC43: S_run_body (perl.c:2521)
    ==37049==    by 0x45BC43: perl_run (perl.c:2444)
    ==37049==    by 0x41DC06: main (perlmain.c:123)
    ==37049==
    Use of uninitialized value $match_indices[0] in array element at 39358.pl line 10.
    ==37049==
    ==37049== HEAP SUMMARY:
    ==37049==     in use at exit: 3,778 bytes in 9 blocks
    ==37049==   total heap usage: 799 allocs, 790 frees, 221,967 bytes allocated
    ==37049==
    ==37049== LEAK SUMMARY:
    ==37049==    definitely lost: 512 bytes in 1 blocks
    ==37049==    indirectly lost: 3,266 bytes in 8 blocks
    ==37049==      possibly lost: 0 bytes in 0 blocks
    ==37049==    still reachable: 0 bytes in 0 blocks
    ==37049==         suppressed: 0 bytes in 0 blocks
    ==37049== Rerun with --leak-check=full to see details of leaked memory
    ==37049==
    ==37049== For counts of detected and suppressed errors, rerun with: -v
    ==37049== ERROR SUMMARY: 17 errors from 13 contexts (suppressed: 0 from 0)

Valgrind is equally disappointed for normal builds of 5.25.2, but they manage to avoid crashing through some stroke of luck. The valgrind errors are the same.

This looks to me like a sign of either modifying a value that is on the context stack, or modifying an array that is in the process of being sort()ed in-place. If the former, then this is a dependency of 77706. If the latter - I vaguely remember another ticket about modifying an array while it is being sorted, this is probably similar. There's some discussion at RT #127759 on that topic.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About