Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S_skip_to_be_ignored_text: Assertion `! (((pRExC_state->utf8)) ? (_Bool)1 : (_Bool)0) || ((unsigned long)(**p) < 128) || (((U8)**p) >= 0xc2)' failed (regcomp.c:16486) #15088

Closed
p5pRT opened this issue Dec 12, 2015 · 8 comments

Comments

@p5pRT
Copy link

p5pRT commented Dec 12, 2015

Migrated from rt.perl.org#126886 (status was 'resolved')

Searchable as RT126886$

@p5pRT
Copy link
Author

p5pRT commented Dec 12, 2015

From @geeknik

The attached "script" causes an assertion failure in S_skip_to_be_ignored_text (regcomp.c​:16486). This bug was found using American Fuzzy Lop. Perl v5.23.6 (v5.23.5-113-g406d554) was compiled as follows​:

./Configure -des -Dusedevel -DDEBUGGING -Dcc=afl-gcc -Doptimize=-O2\ -g && AFL_HARDEN=1 make -j6

Starting program​: /home/geeknik/perl/perl test39-min
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
perl​: regcomp.c​:16486​: S_skip_to_be_ignored_text​: Assertion `! (((pRExC_state->utf8)) ? (_Bool)1 : (_Bool)0) || ((unsigned long)(**p) < 128) || (((U8)**p) >= 0xc2)' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff6d90165 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c​:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c​: No such file or directory.
(gdb) bt
#0 0x00007ffff6d90165 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c​:64
#1 0x00007ffff6d933e0 in *__GI_abort () at abort.c​:92
#2 0x00007ffff6d89311 in *__GI___assert_fail (
  assertion=assertion@​entry=0xeea0c8 "! (((pRExC_state->utf8)) ? (_Bool)1 : (_Bool)0) || ((unsigned long)(**p) < 128) || (((U8)**p) >= 0xc2)", file=<optimized out>, file@​entry=0xee72b2 "regcomp.c",
  line=line@​entry=16486, function=function@​entry=0xef41f0 "S_skip_to_be_ignored_text") at assert.c​:81
#3 0x0000000000697bb1 in S_skip_to_be_ignored_text (pRExC_state=0x7fffffffdd60, p=<optimized out>,
  force_to_xmod=<optimized out>) at regcomp.c​:16486
#4 0x0000000000705d55 in S_nextchar (pRExC_state=0x7fffffffdd60) at regcomp.c​:16549
#5 S_reg (pRExC_state=0x7fffffffdd60, paren=40, flagp=0x7fffffffd810, depth=5) at regcomp.c​:10444
#6 0x0000000000730e18 in S_regatom (pRExC_state=pRExC_state@​entry=0x7fffffffdd60,
  flagp=flagp@​entry=0x7fffffffd9e0, depth=depth@​entry=4) at regcomp.c​:11801
#7 0x000000000073e88b in S_regpiece (depth=3, flagp=<synthetic pointer>, pRExC_state=0x7fffffffdd60)
  at regcomp.c​:10879
#8 S_regbranch (pRExC_state=pRExC_state@​entry=0x7fffffffdd60, flagp=flagp@​entry=0x7fffffffdaa0,
  first=first@​entry=1, depth=depth@​entry=2) at regcomp.c​:10804
#9 0x0000000000743975 in S_reg (pRExC_state=pRExC_state@​entry=0x7fffffffdd60,
  flagp=flagp@​entry=0x7fffffffdbf0, depth=1, paren=0) at regcomp.c​:10549
#10 0x00000000007841a1 in Perl_re_op_compile (patternp=patternp@​entry=0x0, pat_count=<optimized out>,
  pat_count@​entry=0, expr=<optimized out>, expr@​entry=0x11c8b88, eng=0xef2e00, old_re=old_re@​entry=0x0,
  is_bare_re=is_bare_re@​entry=0x0, orig_rx_flags=orig_rx_flags@​entry=0, pm_flags=0) at regcomp.c​:6748
#11 0x00000000004e945f in Perl_pmruntime (o=<optimized out>, expr=0x11c8b88, repl=0x11c8b48,
  isreg=isreg@​entry=true, floor=<optimized out>) at op.c​:5596
#12 0x000000000065d4bd in Perl_yyparse (gramtype=gramtype@​entry=258) at perly.y​:1032
#13 0x000000000052e625 in S_parse_body (env=env@​entry=0x0, xsinit=xsinit@​entry=0x42e190 <xs_init>)
  at perl.c​:2312
#14 0x0000000000534737 in perl_parse (my_perl=<optimized out>, xsinit=xsinit@​entry=0x42e190 <xs_init>,
  argc=<optimized out>, argv=<optimized out>, env=env@​entry=0x0) at perl.c​:1634
#15 0x000000000042dda8 in main (argc=2, argv=0x7fffffffe678, env=0x7fffffffe690) at perlmain.c​:114

@p5pRT
Copy link
Author

p5pRT commented Dec 12, 2015

From @geeknik

test39-min

@p5pRT
Copy link
Author

p5pRT commented Dec 12, 2015

From @khwilliamson

I will fix this ticket

On Sat Dec 12 10​:44​:04 2015, brian.carpenter@​gmail.com wrote​:

The attached "script" causes an assertion failure in
S_skip_to_be_ignored_text (regcomp.c​:16486). This bug was found using
American Fuzzy Lop. Perl v5.23.6 (v5.23.5-113-g406d554) was compiled
as follows​:

./Configure -des -Dusedevel -DDEBUGGING -Dcc=afl-gcc -Doptimize=-O2\
-g && AFL_HARDEN=1 make -j6

Starting program​: /home/geeknik/perl/perl test39-min
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-
gnu/libthread_db.so.1".
perl​: regcomp.c​:16486​: S_skip_to_be_ignored_text​: Assertion `!
(((pRExC_state->utf8)) ? (_Bool)1 : (_Bool)0) || ((unsigned long)(**p)
< 128) || (((U8)**p) >= 0xc2)' failed.

Program received signal SIGABRT, Aborted.
0x00007ffff6d90165 in *__GI_raise (sig=<optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c​:64
64 ../nptl/sysdeps/unix/sysv/linux/raise.c​: No such file or
directory.
(gdb) bt
#0 0x00007ffff6d90165 in *__GI_raise (sig=<optimized out>) at
../nptl/sysdeps/unix/sysv/linux/raise.c​:64
#1 0x00007ffff6d933e0 in *__GI_abort () at abort.c​:92
#2 0x00007ffff6d89311 in *__GI___assert_fail (
assertion=assertion@​entry=0xeea0c8 "! (((pRExC_state->utf8)) ?
(_Bool)1 : (_Bool)0) || ((unsigned long)(**p) < 128) || (((U8)**p) >=
0xc2)", file=<optimized out>, file@​entry=0xee72b2 "regcomp.c",
line=line@​entry=16486, function=function@​entry=0xef41f0
"S_skip_to_be_ignored_text") at assert.c​:81
#3 0x0000000000697bb1 in S_skip_to_be_ignored_text
(pRExC_state=0x7fffffffdd60, p=<optimized out>,
force_to_xmod=<optimized out>) at regcomp.c​:16486
#4 0x0000000000705d55 in S_nextchar (pRExC_state=0x7fffffffdd60) at
regcomp.c​:16549
#5 S_reg (pRExC_state=0x7fffffffdd60, paren=40, flagp=0x7fffffffd810,
depth=5) at regcomp.c​:10444
#6 0x0000000000730e18 in S_regatom
(pRExC_state=pRExC_state@​entry=0x7fffffffdd60,
flagp=flagp@​entry=0x7fffffffd9e0, depth=depth@​entry=4) at
regcomp.c​:11801
#7 0x000000000073e88b in S_regpiece (depth=3, flagp=<synthetic
pointer>, pRExC_state=0x7fffffffdd60)
at regcomp.c​:10879
#8 S_regbranch (pRExC_state=pRExC_state@​entry=0x7fffffffdd60,
flagp=flagp@​entry=0x7fffffffdaa0,
first=first@​entry=1, depth=depth@​entry=2) at regcomp.c​:10804
#9 0x0000000000743975 in S_reg
(pRExC_state=pRExC_state@​entry=0x7fffffffdd60,
flagp=flagp@​entry=0x7fffffffdbf0, depth=1, paren=0) at
regcomp.c​:10549
#10 0x00000000007841a1 in Perl_re_op_compile
(patternp=patternp@​entry=0x0, pat_count=<optimized out>,
pat_count@​entry=0, expr=<optimized out>, expr@​entry=0x11c8b88,
eng=0xef2e00, old_re=old_re@​entry=0x0,
is_bare_re=is_bare_re@​entry=0x0,
orig_rx_flags=orig_rx_flags@​entry=0, pm_flags=0) at regcomp.c​:6748
#11 0x00000000004e945f in Perl_pmruntime (o=<optimized out>,
expr=0x11c8b88, repl=0x11c8b48,
isreg=isreg@​entry=true, floor=<optimized out>) at op.c​:5596
#12 0x000000000065d4bd in Perl_yyparse (gramtype=gramtype@​entry=258)
at perly.y​:1032
#13 0x000000000052e625 in S_parse_body (env=env@​entry=0x0,
xsinit=xsinit@​entry=0x42e190 <xs_init>)
at perl.c​:2312
#14 0x0000000000534737 in perl_parse (my_perl=<optimized out>,
xsinit=xsinit@​entry=0x42e190 <xs_init>,
argc=<optimized out>, argv=<optimized out>, env=env@​entry=0x0) at
perl.c​:1634
#15 0x000000000042dda8 in main (argc=2, argv=0x7fffffffe678,
env=0x7fffffffe690) at perlmain.c​:114

--
Karl Williamson

@p5pRT
Copy link
Author

p5pRT commented Dec 12, 2015

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Feb 21, 2016

From @khwilliamson

Thanks for finding this. This was fixed by
8571c4b
--
Karl Williamson

@p5pRT
Copy link
Author

p5pRT commented Feb 21, 2016

@khwilliamson - Status changed from 'open' to 'pending release'

@p5pRT
Copy link
Author

p5pRT commented May 13, 2016

From @khwilliamson

Thank you for submitting this report. You have helped make Perl better.
 
With the release of Perl 5.24.0 on May 9, 2016, this and 149 other issues have been resolved.

Perl 5.24.0 may be downloaded via https://metacpan.org/release/RJBS/perl-5.24.0

@p5pRT
Copy link
Author

p5pRT commented May 13, 2016

@khwilliamson - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant