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

Adding a -bounds-checking contrary to -unsafe flag #8814

bobzhang opened this issue Jul 19, 2019 · 2 comments


Copy link

commented Jul 19, 2019

We have an -unsafe flag to make program faster (but dangerous).
It would be convenient to have such a flag to diagnose memory corruption issues


This comment has been minimized.

Copy link

commented Jul 31, 2019

OK, I bite:

Bounds checking is already the default. What would the hypothetical -bounds-checking flag do that is not currently done?


This comment has been minimized.

Copy link
Member Author

commented Aug 1, 2019

Here is my experience: sometimes we are too confident that we use Array/String.unsafe_* in lots of cases, and hit a hard to find bug, so it would be helpful to have a flag to restore safe behavior for bug finding.
I understand that you could say you should use unsafe_* in very rare places, but the reality is quite complex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.