Typical security issues in C++: why the GC isn't your enemy
Dukc
ajieskola at gmail.com
Mon Dec 12 15:57:26 UTC 2022
On Monday, 12 December 2022 at 13:22:56 UTC, Adam D Ruppe wrote:
> On Monday, 12 December 2022 at 12:23:08 UTC, Basile B. wrote:
>> The problem would be then that there's no way to disable
>> assertions, so we also need
>>
>> -assertion={on|off}
>
> Already there:
>
> -check=[assert|bounds|in|invariant|out|switch][=[on|off]]
> enable or disable specific checks
> -checkaction=[D|C|halt|context]
> behavior on assert/boundscheck/finalswitch
>
Plus, you should not have much more desire to disable assertions
than bounds checking. Failing a disabled assert is undefined
behaviour, meaning memory safety is off if they are disabled. If
you want an assertion you can disable for performance, write
`debug assert`.
More information about the Digitalmars-d
mailing list