-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
hvncat
miscomputes output bounds for empty Vectors
#41047
Comments
With
|
Looks like the new |
There are no boundschecks so these lead to problems such as #41047.
There are no boundschecks so these lead to problems such as #41047.
There are no boundschecks so these lead to problems such as #41047.
There are no boundschecks so these lead to problems such as #41047.
hvncat
segfault and bughvncat
miscomputes output bounds for empty Vectors
Just seeing this. With respect to The loop discovering the array bounds is what (is supposed to) guarantee no out of bounds accesses, so I take issue with saying |
Turns out there were two separate issues with the shape variant of One was handling of zero-length arrays, leading to an underfilled array. The second, which led to the segfault, was a dumb error on my part, where I did not expand the |
@BioTurboNick to be clear, your PR and dedication are great and much appreciated! I'm sometimes annoyed at code, but not usually at the people behind it. |
Fair enough 😁 |
There are no boundschecks so these lead to problems such as JuliaLang#41047.
@BioTurboNick Does one of your broken up PRs fix this issue? If so, would be good to link back to here. |
Yes, partially. #41196 catches the one that leads to an underfilled array and works for Currently, it treats them like they're nothing. e.g. |
There are no boundschecks so these lead to problems such as JuliaLang#41047.
I believe this is fixed by #41196; plz reopen if I'm mistaken. |
Yes. I'll open another issue for the zero-length array inputs. |
On: Version 1.7.0-DEV.1222 (2021-06-01)
Commit 4a8572f
Tried to figure out the new syntax for hvncat and ran into this bug:
Not sure what the expected behavior is, but since
[7;8;;[]]
throws an error, I assume that some boundscheck is missing.This seems to be an almost equivalent call
Trying to debug, these works as expected:
However, you can quickly cause a segfault:
Trace:
Edit: Bug generalizes to higher dims:
[zeros(Int,2,0);;;7;8]
The text was updated successfully, but these errors were encountered: