Typical security issues in C++: why the GC isn't your enemy

youSureAboutThat youSureAboutThat at gmail.com
Mon Dec 12 05:06:06 UTC 2022


On Friday, 9 December 2022 at 22:22:36 UTC, Walter Bright wrote:
>
> Bounds checking is not disabled with -release

//compile with: -release (and see what happens)

module test;

import std.stdio;

void main()
{

     int[5] array = [0, 1, 2, 3, 4];

     for (size_t i = 0; i < array.length + 1; i++)
         writeln("Element ", i, " = ", array[i]);

}




More information about the Digitalmars-d mailing list