Hi !
When i compile druntime with -release flag and then builds an app using it, following code crashes:
ubyte[3] aa;
int n = 4;
aa[n] = 5;
If i compile it without -release, then all is OK.
I don't know how this flag affects range exceptions in applications.
Also i don't know is it a bug or as designed. But i think that druntime with -release flag should work.
Comment #1 by ketmar — 2015-03-19T16:00:03Z
this is the expected result: "-release" flag turns off bounds checking. it was designed to do so. using "-release" means "i fully debugged my code and i'm sure that there either no out-of-bounds errors, or i'm checking that manually".
so i'm closing the bug as invalid.
Comment #2 by ketmar — 2015-03-19T16:01:41Z
oooops. sorry. today is not a my day.
Comment #3 by temtaime — 2015-03-19T16:03:42Z
It's OK, but bounds checks are in my app compiled with different flags, not in druntime.
Also if i compile it with -noboundscheck and without -release, all is working!
Comment #4 by temtaime — 2015-03-19T16:04:19Z
*it, i mean druntime
Comment #5 by ketmar — 2015-03-19T16:10:27Z
yes, sorry, i misread your report.
Comment #6 by robert.schadek — 2024-12-07T13:34:59Z