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

reflect: ArrayOf allows negative length #43603

Closed
mdempsky opened this issue Jan 9, 2021 · 4 comments
Closed

reflect: ArrayOf allows negative length #43603

mdempsky opened this issue Jan 9, 2021 · 4 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@mdempsky
Copy link
Contributor

mdempsky commented Jan 9, 2021

This program should probably panic instead of printing [-100]uint8: https://play.golang.org/p/gnjsjBoKNvQ

/cc @griesemer @ianlancetaylor

@mdempsky mdempsky added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Jan 9, 2021
@griesemer griesemer added this to the Go1.17 milestone Jan 9, 2021
@ianlancetaylor
Copy link
Contributor

I agree that this should panic.

@bcmills bcmills added the NeedsFix The path to resolution is known, but the work has not been done. label Jan 11, 2021
@gopherbot gopherbot removed the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Jan 11, 2021
@tpaschalis
Copy link
Contributor

I'll take a stab if there's no objection!

@mdempsky
Copy link
Contributor Author

@tpaschalis No objection. I think this should be a pretty straightforward issue to fix. Thanks.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/284136 mentions this issue: reflect: panic if ArrayOf is called with negative count

@golang golang locked and limited conversation to collaborators Mar 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

6 participants