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

Open
bobzhang opened this issue Jul 19, 2019 · 2 comments

Comments

@bobzhang
Copy link
Member

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

@xavierleroy

This comment has been minimized.

Copy link
Contributor

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?

@bobzhang

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
Projects
None yet
2 participants
You can’t perform that action at this time.