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

Malformed UTF-8 (string out of bounds) with “say ('a' x 10000).IO.open” #4473

Closed
p6rt opened this issue Aug 15, 2015 · 8 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Aug 15, 2015

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

Searchable as RT125813$

@p6rt
Copy link
Author

p6rt commented Aug 15, 2015

From @AlexDaniel

Code​:
say ('a' x 970).IO.open;

Result​:
Failed to open file
/home/alex/perl6test/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa​:
name too l
  in block <unit> at ./test.pl​:2

Notice how it says �name too l�. It should be �name too long� but it does
not fit. And if we add more digits​:
say ('a' x 10000).IO.open;

Result​:
Malformed UTF-8 at line 1 col 1029
  in block <unit> at ./test.pl​:2

@p6rt
Copy link
Author

p6rt commented Apr 1, 2016

From @coke

Similar behavior on OS X
--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Apr 1, 2016

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

@p6rt
Copy link
Author

p6rt commented Jun 9, 2017

From @samcv

Result​:
Malformed UTF-8 at line 1 col 1029
in block <unit> at ./test.pl​:2

@p6rt
Copy link
Author

p6rt commented Jun 9, 2017

From @samcv

I don't get the UTF-8 malformed error. Bisectable output​:

<samcv> bisectable6, say ('a' x 10000).IO.open;
<bisectable6> samcv, Bisecting by output (old=2015.12 new=f0c3bf7) because on both starting points the exit code is 1
<bisectable6> samcv, bisect log​: https://gist.github.com/da75432d7785e4bdc0c0a74e6084b49c
<bisectable6> samcv, (2015-12-25) rakudo/rakudo@07fecb5

Seems to show it has been fixed for a while.

Maybe this should change to a LTA due to the error message?

@p6rt
Copy link
Author

p6rt commented Jun 9, 2017

From @AlexDaniel

An important line from bisectable output was omitted :)

<bisectable> samcv, The result looks a bit unrealistic, doesn't it? Most probably the output is different on every commit (e.g. ï½¢bisect​: say randï½£)

We can try this​:

<AlexDaniel> c​: releases say ('a' x 10000).IO.open
<committable6> AlexDaniel, https://gist.github.com/0727db8b695fbed572cf4b9cd9fa6edc

Looking at the output, we can see that it was changed somewhere between 2017.03 and 2017.04.3, so actually it is a fairly recent fix.

I tried to narrow it down with a bot, but couldn't. Not that it matters much, just wanted to note that it is not as new.

On 2017-06-08 21​:11​:51, samantham@​posteo.net wrote​:

I don't get the UTF-8 malformed error. Bisectable output​:

<samcv> bisectable6, say ('a' x 10000).IO.open;
<bisectable6> samcv, Bisecting by output (old=2015.12 new=f0c3bf7)
because on both starting points the exit code is 1
<bisectable6> samcv, bisect log​:
https://gist.github.com/da75432d7785e4bdc0c0a74e6084b49c
<bisectable6> samcv, (2015-12-25)
rakudo/rakudo@07fecb5

Seems to show it has been fixed for a while.

Maybe this should change to a LTA due to the error message?

@p6rt
Copy link
Author

p6rt commented Oct 13, 2017

From @zoffixznet

Tests​: Raku/roast@11fb4415f0

@p6rt
Copy link
Author

p6rt commented Oct 13, 2017

@zoffixznet - Status changed from 'open' to 'resolved'

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

No branches or pull requests

1 participant