SafeD doesn't prevent me from dereferencing a null reference

Walter Bright newshound2 at digitalmars.com
Thu Aug 18 18:24:41 UTC 2022


On 8/18/2022 8:37 AM, Yutori wrote:
> Oh, I understand it now. So I guess that @safe in D is supposed to prevent only 
> UB, not all memory errors that could possibly happen, and since dereferencing 
> null will always result in a page fault, it isn't UB.

That's right.


More information about the Digitalmars-d mailing list