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
Negative overflow in Str.index $startpos #4466
Comments
From @AlexDanielCode: Result: |
From @labsterThis is actually a Moarbug: labster: m: use nqp; say nqp::index('xxy', 'y', -999999999999999999999999999999999999999999999999999999999999999) On Mon Aug 10 17:47:12 2015, alex.jakimenko@gmail.com wrote:
|
From @lizmatFixed with 14939e39d24541cc29fd12, tests added with e29df31, closable
|
The RT System itself - Status changed from 'new' to 'open' |
From @lizmatFixed with 14939e39d24541cc29fd12, tests added with e29df31, closable
|
From @usev6On Tue Aug 11 01:15:38 2015, elizabeth wrote:
Great, ticket closed. |
@usev6 - Status changed from 'open' to 'resolved' |
From @usev6It looks like the overflow still happens. (Expected result is different nowadays, since negative start positions are disallowed (see rakudo/rakudo@fa3ce116e3). See also http://irclog.perlgeek.de/perl6/2015-11-21#i_11577908 $ perl6-m -e 'say index("xxy", "y", -999999999999999999999999999999999999999999999999999999999999999)' $ perl6-j -e 'say index("xxy", "y", -999999999999999999999999999999999999999999999999999999999999999)' Actually thrown at: There are fudged tests ('todo') for this in S32-str/index.t and S32-str/rindex.t. Also nqp-m and nqp-j still behave differently: $ nqp-m -e 'nqp::say(nqp::index("xxy", "y", -999999999999999999999999999999999999999999999999999999999999999))' $ nqp-j -e 'nqp::say(nqp::index("xxy", "y", -999999999999999999999999999999999999999999999999999999999999999))' |
1 similar comment
From @usev6It looks like the overflow still happens. (Expected result is different nowadays, since negative start positions are disallowed (see rakudo/rakudo@fa3ce116e3). See also http://irclog.perlgeek.de/perl6/2015-11-21#i_11577908 $ perl6-m -e 'say index("xxy", "y", -999999999999999999999999999999999999999999999999999999999999999)' $ perl6-j -e 'say index("xxy", "y", -999999999999999999999999999999999999999999999999999999999999999)' Actually thrown at: There are fudged tests ('todo') for this in S32-str/index.t and S32-str/rindex.t. Also nqp-m and nqp-j still behave differently: $ nqp-m -e 'nqp::say(nqp::index("xxy", "y", -999999999999999999999999999999999999999999999999999999999999999))' $ nqp-j -e 'nqp::say(nqp::index("xxy", "y", -999999999999999999999999999999999999999999999999999999999999999))' |
@usev6 - Status changed from 'resolved' to 'open' |
From @lizmatThe problem is really in the implementation of nqp::unbox_i on JVM: $ perl6-j -e 'use nqp; nqp::unbox_i(-99999999999999999999999999)’ $ 6 'use nqp; nqp::unbox_i(-99999999999999999999999999)
Liz
|
From @lizmatCommit 292336995df5220f93ec4c5c makes the use of *any* bigint as position in index/rindex a Failure. Tests have been adapted accordingly. I think this ticket can be closed.
|
From @cokeChristian, can you double check again? Thanks. -- |
From @usev6The problems regarding negative overflows seem to be fixed. All tests for this ticket are passing. I'm closing this ticket as 'resolved'. For the related discussion (different behavior of nqp::index with negative $startpos between Moar and JVM) I opened a new ticket: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=127913 |
1 similar comment
From @usev6The problems regarding negative overflows seem to be fixed. All tests for this ticket are passing. I'm closing this ticket as 'resolved'. For the related discussion (different behavior of nqp::index with negative $startpos between Moar and JVM) I opened a new ticket: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=127913 |
@usev6 - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#125784 (status was 'resolved')
Searchable as RT125784$
The text was updated successfully, but these errors were encountered: