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

[perl #129893] gv.c:1492: HV *S_gv_stashsvpvn_cached(SV *, constchar *, U32, I32): Assertion `PL_valid_types_IVX[((svtype)((_svivx)->sv_flags& 0xff)) & 0xf]' failed

From:
Brian Carpenter
Date:
October 16, 2016 15:20
Subject:
[perl #129893] gv.c:1492: HV *S_gv_stashsvpvn_cached(SV *, constchar *, U32, I32): Assertion `PL_valid_types_IVX[((svtype)((_svivx)->sv_flags& 0xff)) & 0xf]' failed
Message ID:
rt-4.0.24-15632-1476631199-134.129893-75-0@perl.org
# New Ticket Created by  Brian Carpenter 
# Please include the string:  [perl #129893]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=129893 >


Triggered in Perl v5.25.6 (v5.25.5-106-g877b982).

od -tx1 test123
0000000 70 72 69 6e 74 20 6d 61 70 20 63 68 72 24 5f 5b
0000020 30 5d 2d 6f 72 64 44 64 0a 5f 2c 40 5f 3d 5b 30
0000040 5d 2d 6f 72 64 2d 64 24 5f 2c 40 5f 3d 27 32 30
0000060 30 6f 63 54 01 00 67 5a 59 54 a8 78 63 56 5c c2
0000100 a8 60 67 65 c7 63 35 27 3d 7e 6d 3b 28 5c 64 1a
0000120 7c 22 29 3b 67 3b 0a
0000127

./perl test123
Can't locate object method "ordDd" via package "_" (perhaps you forgot to
load "_"?) at test123 line 1.
perl: gv.c:1492: HV *S_gv_stashsvpvn_cached(SV *, const char *, U32, I32):
Assertion `PL_valid_types_IVX[((svtype)((_svivx)->sv_flags & 0xff)) & 0xf]'
failed.
Aborted


Running Perl 5.20.2-3+deb8u6 under Valgrind we get a nice segfault:

Can't locate object method "ordDd" via package "_" (perhaps you forgot to
load "_"?) at test123 line 1.
==12280== Invalid read of size 8
==12280==    at 0x4E90336: Perl_gv_fetchmeth_pvn (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4E90513: Perl_gv_fetchmeth_pvn (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4E907C4: Perl_gv_fetchmeth_pvn_autoload (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F0C326: ??? (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F0CECF: Perl_sv_clear (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F0D289: Perl_sv_free2 (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F0D5CC: ??? (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F03DC6: ??? (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F0D8E7: Perl_sv_clean_objs (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4E8641C: perl_destruct (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x400DE0: main (in /usr/bin/perl)
==12280==  Address 0x5f3c7b8 is 8 bytes inside a block of size 32 free'd
==12280==    at 0x4C29E90: free (vg_replace_malloc.c:473)
==12280==    by 0x4F0D1A7: Perl_sv_clear (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F0D289: Perl_sv_free2 (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F3018F: Perl_free_tmps (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4E8B750: perl_run (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x400E18: main (in /usr/bin/perl)
==12280==
==12280== Invalid read of size 4
==12280==    at 0x4E8FFA0: Perl_gv_stashsv (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4E90346: Perl_gv_fetchmeth_pvn (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4E90513: Perl_gv_fetchmeth_pvn (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4E907C4: Perl_gv_fetchmeth_pvn_autoload (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F0C326: ??? (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F0CECF: Perl_sv_clear (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F0D289: Perl_sv_free2 (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F0D5CC: ??? (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F03DC6: ??? (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F0D8E7: Perl_sv_clean_objs (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4E8641C: perl_destruct (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x400DE0: main (in /usr/bin/perl)
==12280==  Address 0xc is not stack'd, malloc'd or (recently) free'd
==12280==
==12280==
==12280== Process terminating with default action of signal 11 (SIGSEGV)
==12280==  Access not within mapped region at address 0xC
==12280==    at 0x4E8FFA0: Perl_gv_stashsv (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4E90346: Perl_gv_fetchmeth_pvn (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4E90513: Perl_gv_fetchmeth_pvn (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4E907C4: Perl_gv_fetchmeth_pvn_autoload (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F0C326: ??? (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F0CECF: Perl_sv_clear (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F0D289: Perl_sv_free2 (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F0D5CC: ??? (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F03DC6: ??? (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4F0D8E7: Perl_sv_clean_objs (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x4E8641C: perl_destruct (in
/usr/lib/x86_64-linux-gnu/libperl.so.5.20.2)
==12280==    by 0x400DE0: main (in /usr/bin/perl)
==12280==  If you believe this happened as a result of a stack
==12280==  overflow in your program's main thread (unlikely but
==12280==  possible), you can try to increase the size of the
==12280==  main thread stack using the --main-stacksize= flag.
==12280==  The main thread stack size used in this run was 8388608.
Segmentation fault



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