Pointers - Is it safe to point to invalid memory?

Monkyyy crazymonkyyy at gmail.com
Sun Aug 17 01:44:38 UTC 2025


On Sunday, 17 August 2025 at 01:19:41 UTC, Brother Bill wrote:
> Merely pointing to an invalid address will not produce UB 
> (undefined behavior)

I linked you to the gc #wontfix list, it's explicitly the magic 
words "UB".

Idk what's actually happens(ub isn't a useful distinction), 
someone would have to extensively test it, but it's expressly not 
"do whatever" someone must've tried the xor linked list and found 
it doesn't work in some case.

An invalid pointer outside common use patterns could confuse the 
GC and some invalid pointers are *known* to confuse the GC(they 
should've keep the code rather then their wontfix list *tsk*)




More information about the Digitalmars-d-learn mailing list