Dereferenced non-allocated pointer error
Opened this issue · 1 comments
adam-mcdaniel commented
To make programs more correct, runtime checks could be added for determining whether or not the program is accessing memory it does not own.
To be a valid pointer, it must either:
- Point to an address that is less than the stack pointer. Pointers to stack variables are valid pointers.
- Point to allocated memory on the heap. Non-allocated memory on the heap should not be accessed.
Dereferencing an address that violates either of those rules could throw a accessed unowned memory
error.
kevinramharak commented
Does this mean that every dereference of a pointer has to be checked? I'm assuming performance is not really a concern right now, but does this not generate a lot of overhead?