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

[perl #131894] runtime error: shift exponent -2 is negative(toke.c:10966:54)

Thread Previous
From:
Brian Carpenter
Date:
August 14, 2017 07:03
Subject:
[perl #131894] runtime error: shift exponent -2 is negative(toke.c:10966:54)
Message ID:
rt-4.0.24-30498-1502694174-322.131894-75-0@perl.org
# New Ticket Created by  Brian Carpenter 
# Please include the string:  [perl #131894]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=131894 >


While fuzzing v5.27.2-135-g7aaa36b196*, undefined-behavior was triggered in
the form of 'shift exponent -2 is negative' in toke.c.

./perl -e '03000000000000000000.0'

toke.c:10966:54: runtime error: shift exponent -2 is negative
    #0 0x92bbc9 in Perl_scan_num /root/perl5/toke.c:10966:54
    #1 0x825478 in Perl_yylex /root/perl5/toke.c:6828:6
    #2 0x965910 in Perl_yyparse /root/perl5/perly.c:340:34
    #3 0x6c1dfe in S_parse_body /root/perl5/perl.c:2414:9
    #4 0x6aeb39 in perl_parse /root/perl5/perl.c:1732:2
    #5 0x5251b6 in main /root/perl5/perlmain.c:121:18
    #6 0x7f9d19e294d9 in __libc_start_main (/lib64/libc.so.6+0x204d9)
    #7 0x4359d9 in _start (/root/perl5/perl+0x4359d9)

SUMMARY: AddressSanitizer: undefined-behavior toke.c:10966:54


Thread Previous


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