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

Assertion `((((U8)((*(((const U8*)(PL_parser->oldoldbufptr))+1 )) | 0)) & 0xC0) == 0x80)' failed (toke.c:525) #15575

Closed
p5pRT opened this issue Sep 1, 2016 · 8 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 1, 2016

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

Searchable as RT129157$

@p5pRT
Copy link
Author

p5pRT commented Sep 1, 2016

From @geeknik

v5.25.4-25-g109ac34*

Minimizing this testcase with afl-tmin caused this assertion to be replaced with the one from bug #129037.

./perl assert556
Malformed UTF-8 character (unexpected non-continuation byte 0xc3, immediately after start byte 0xc3) at assert556 line 2.
Malformed UTF-8 character (unexpected non-continuation byte 0xc3, immediately after start byte 0xc3) at assert556 line 2.
Malformed UTF-8 character (unexpected non-continuation byte 0xc3, immediately after start byte 0xc3) at assert556 line 2.
Malformed UTF-8 character (unexpected non-continuation byte 0xc3, immediately after start byte 0xc3) at assert556 line 2.
Malformed UTF-8 character (unexpected non-continuation byte 0xc3, immediately after start byte 0xc3) at assert556 line 2.
Malformed UTF-8 character (unexpected non-continuation byte 0xc3, immediately after start byte 0xc3) at assert556 line 2.
Malformed UTF-8 character (unexpected non-continuation byte 0xc3, immediately after start byte 0xc3) at assert556 line 2.
Malformed UTF-8 character (unexpected non-continuation byte 0xc3, immediately after start byte 0xc3) at assert556 line 2.
Malformed UTF-8 character (unexpected non-continuation byte 0xc3, immediately after start byte 0xc3) at assert556 line 2.
Malformed UTF-8 character (unexpected non-continuation byte 0xc3, immediately after start byte 0xc3) at assert556 line 2.
Malformed UTF-8 character (unexpected non-continuation byte 0x74, immediately after start byte 0xc3) at assert556 line 2.
Bareword found where operator expected at assert556 line 2, near ""9 "Y"
  (Missing operator before Y?)
Wide character in print at assert556 line 86.
Bareword found where operator expected at assert556 line 86, near "▒▒▒▒▒▒▒▒tprotobyname"; "9 "Y=n {pop and-p[p };shmread $^H LLLLL_'_"
perl​: toke.c​:525​: void S_no_op(const char *const, char *)​: Assertion `((((U8)((*(((const U8*)(PL_parser->oldoldbufptr))+1 )) | 0)) & 0xC0) == 0x80)' failed.
Aborted.

#0 0x00007ffff6cf2067 in __GI_raise (sig=sig@​entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c​:56
#1 0x00007ffff6cf3448 in __GI_abort () at abort.c​:89
#2 0x00007ffff6ceb266 in __assert_fail_base (fmt=0x7ffff6e24238 "%s%s%s​:%u​: %s%sAssertion `%s' failed.\n%n",
  assertion=assertion@​entry=0xd5ae80 <.str1033> "((((U8)((*(((const U8*)(PL_parser->oldoldbufptr))+1 )) | 0)) & 0xC0) == 0x80)",
  file=file@​entry=0xd66637 "toke.c", line=line@​entry=525,
  function=function@​entry=0xd5ace0 <__PRETTY_FUNCTION__.S_no_op> "void S_no_op(const char *const, char *)") at assert.c​:92
#3 0x00007ffff6ceb312 in __GI___assert_fail (
  assertion=0xd5ae80 <.str1033> "((((U8)((*(((const U8*)(PL_parser->oldoldbufptr))+1 )) | 0)) & 0xC0) == 0x80)", file=0xd66637 "toke.c",
  line=525, function=0xd5ace0 <__PRETTY_FUNCTION__.S_no_op> "void S_no_op(const char *const, char *)") at assert.c​:101
#4 0x0000000000693c81 in S_no_op (what=<optimized out>, s=<optimized out>) at toke.c​:525
#5 0x00000000006224f0 in Perl_yylex () at toke.c​:6958
#6 0x00000000006ad346 in Perl_yyparse (gramtype=<optimized out>) at perly.c​:334
#7 0x000000000059c392 in S_parse_body (env=<optimized out>, xsinit=<optimized out>) at perl.c​:2373
#8 0x000000000059272d in perl_parse (my_perl=<optimized out>, xsinit=<optimized out>, argc=<optimized out>, argv=<optimized out>,
  env=<optimized out>) at perl.c​:1689
#9 0x00000000004de6a6 in main (argc=<optimized out>, argv=<optimized out>, env=<optimized out>) at perlmain.c​:121

@p5pRT
Copy link
Author

p5pRT commented Sep 1, 2016

From @geeknik

assert556.gz

@p5pRT
Copy link
Author

p5pRT commented Sep 2, 2016

From @cpansprout

On Wed Aug 31 21​:51​:33 2016, brian.carpenter@​gmail.com wrote​:

v5.25.4-25-g109ac34*

Minimizing this testcase with afl-tmin caused this assertion to be
replaced with the one from bug #129037.

./perl assert556
Malformed UTF-8 character (unexpected non-continuation byte 0xc3,

Does the patch from #126310 fix this?

--

Father Chrysostomos

@p5pRT
Copy link
Author

p5pRT commented Sep 2, 2016

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

@p5pRT
Copy link
Author

p5pRT commented Feb 7, 2017

From @khwilliamson

Thanks for finding and reporting this problem. It turns out that it was fixed by​:

commit 6cdc5cd
Author​: Karl Williamson <khw@​cpan.org>
Date​: Fri Dec 2 09​:35​:53 2016 -0700

  PATCH​: [perl #126310] single quote UTF-8 malformation detection
 
  This adds UTF-8 wellformedness checking in Perl_lex_next_chunk, which
  should get called for all program text, so this makes sure the entire
  program is well-formed, not just single- or double-quoted strings.

I've added the script for the failure in this ticket to our test suite in commit 1fb23c7
--
Karl Williamson

@p5pRT
Copy link
Author

p5pRT commented Feb 7, 2017

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

@p5pRT
Copy link
Author

p5pRT commented May 30, 2017

From @khwilliamson

Thank you for filing this report. You have helped make Perl better.

With the release today of Perl 5.26.0, this and 210 other issues have been
resolved.

Perl 5.26.0 may be downloaded via​:
https://metacpan.org/release/XSAWYERX/perl-5.26.0

If you find that the problem persists, feel free to reopen this ticket.

@p5pRT
Copy link
Author

p5pRT commented May 30, 2017

@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