develooper Front page | perl.perl5.porters | Postings from August 2017

[perl #131912] runtime error: left shift of 1 by 31 places cannot berepresented in type 'int' (dump.c:581:52)

Thread Next
From:
Brian Carpenter
Date:
August 16, 2017 18:19
Subject:
[perl #131912] runtime error: left shift of 1 by 31 places cannot berepresented in type 'int' (dump.c:581:52)
Message ID:
rt-4.0.24-27292-1502907562-1392.131912-75-0@perl.org
# New Ticket Created by  Brian Carpenter 
# Please include the string:  [perl #131912]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=131912 >


While fuzzing v5.27.2-135-g7aaa36b196*, undefined-behavior was triggered in
the form of a 'left shift of 1 by 31 places' in dump.c.

./perl -DB -e "/0\l0@0@0-@0@@0@@0@@0@@0@0@@0@@0@@0@@0@@0@'0/"

*SNIP*

dump.c:581:52: runtime error: left shift of 1 by 31 places cannot be
represented in type 'int'
    #0 0xc86d96 in S_opdump_indent /root/perl5/dump.c:581:52
    #1 0xc1b6a1 in S_do_op_dump_bar /root/perl5/dump.c:986:5
    #2 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #3 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #4 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #5 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #6 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #7 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #8 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #9 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #10 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #11 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #12 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #13 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #14 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #15 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #16 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #17 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #18 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #19 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #20 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #21 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #22 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #23 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #24 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #25 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #26 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #27 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #28 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #29 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #30 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #31 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #32 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #33 0xc1dc8a in S_do_op_dump_bar /root/perl5/dump.c:1268:6
    #34 0xc1252c in Perl_do_op_dump /root/perl5/dump.c:1278:5
    #35 0xc1252c in Perl_op_dump /root/perl5/dump.c:1294
    #36 0xc1252c in Perl_dump_all_perl /root/perl5/dump.c:640
    #37 0x6c8487 in S_run_body /root/perl5/perl.c:2527:6
    #38 0x6c8487 in perl_run /root/perl5/perl.c:2484
    #39 0x5251dc in main /root/perl5/perlmain.c:123:9
    #40 0x7ff3a1cb34d9 in __libc_start_main (/lib64/libc.so.6+0x204d9)
    #41 0x4359d9 in _start (/root/perl5/perl+0x4359d9)

SUMMARY: AddressSanitizer: undefined-behavior dump.c:581:52


Thread Next


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