-
Couldn't load subscription status.
- Fork 1.4k
Fix Span Substring Bounds Handling #9285
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
Conversation
|
💵 To receive payouts, sign up on Algora, link your Github account and connect with Stripe. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Saturn225, thanks for the contribution. Could you please include the test that was included in the linked issue to ensure that it solves the issue?
|
@kyri-petrou @Kalin-Rudnicki Is it to use izumi-reflect / scala-reflect of the reproducer in the issue mentioned |
|
But I have reproduced to reflect the same for reproduce and this patch worked fine! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Saturn225 I think there is likely a more fundamental problem which is the incorrect calculation of bounds in the Span. Although given that the reproducer in the linked issue is not really straightforward (I'm actually not sure what those objects / classes come from) and that a "proper" fix would require changes to macros that might cause other edge-case issues, I'm OK with going ahead with this fix
Here the error arised because the
Span.substringin TestArrow.scala throws an IndexOutOfBoundsException when the specified start and end values exceed the length of the target string. This issue affects the rendering of error messages for failed assertions. To fix this behaviour seen I have added clamping for out-of-bounds start and end indices in Span substring and tests to verify for the same/claim #9209