On Wednesday, 8 March 2017 at 15:48:47 UTC, Timon Gehr wrote:
On 07.03.2017 16:48, Kagamin wrote:
I might need to point out that -release does not disable bounds checking in @safe code while it has been stated that -release introduces UB for assertion failures in @safe code.

There is no flag for disabling assertion/contract checking without potentially introducing new UB.

Why is this the best possible situation?

Even with a failed assertion, I believe @safe does still guarantee that no memory violations will happen. The program will go awry, but it will just misbehave. It won't stomp memory that might be of another type or even executable code. I believe that's why it's done how it is.


Reply via email to