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

[perl #131893] runtime error: signed integer overflow: 1 +9223372036854775807 cannot be represented in type 'long' (regcomp.c:5935:23)

Thread Previous | Thread Next
From:
Brian Carpenter
Date:
August 14, 2017 02:33
Subject:
[perl #131893] runtime error: signed integer overflow: 1 +9223372036854775807 cannot be represented in type 'long' (regcomp.c:5935:23)
Message ID:
rt-4.0.24-29565-1502677996-134.131893-75-0@perl.org
# New Ticket Created by  Brian Carpenter 
# Please include the string:  [perl #131893]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=131893 >


While fuzzing v5.27.2-135-g7aaa36b196*, undefined-behavior was triggered in
the form of a signed integer overflow in regcomp.c, however I'm not sure if
this is a bug.

./perl -e "0=~'0(0?(0||00*))|'"

regcomp.c:5935:23: runtime error: signed integer overflow: 1 +
9223372036854775807 cannot be represented in type 'long'
    #0 0xa5aa70 in S_study_chunk /root/perl5/regcomp.c:5935:23
    #1 0xa6df1c in S_study_chunk /root/perl5/regcomp.c:5894:35
    #2 0x9d6c65 in Perl_re_op_compile /root/perl5/regcomp.c:7574:11
    #3 0x56abc9 in Perl_pmruntime /root/perl5/op.c:5885:6
    #4 0x56413d in Perl_bind_match /root/perl5/op.c:4017:9
    #5 0x96ddc0 in Perl_yyparse /root/perl5/perly.y:990:23
    #6 0x6c1dfe in S_parse_body /root/perl5/perl.c:2414:9
    #7 0x6aeb39 in perl_parse /root/perl5/perl.c:1732:2
    #8 0x5251b6 in main /root/perl5/perlmain.c:121:18
    #9 0x7fe7401094d9 in __libc_start_main (/lib64/libc.so.6+0x204d9)
    #10 0x4359d9 in _start (/root/perl5/perl+0x4359d9)

SUMMARY: AddressSanitizer: undefined-behavior regcomp.c:5935:23


Thread Previous | 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