memory safety checks and trust
Walter Bright
newshound2 at digitalmars.com
Tue Apr 14 20:14:42 UTC 2020
On 4/14/2020 10:16 AM, Steven Schveighoffer wrote:
> That being said, I agree with the simple case of returning a pointer from a
> stack variable directly from a function being disallowed. That also can be
> easily worked around, which should probably be required, but is never correct
> anyway.
Oh, it can be correct, when one wants to examine the stack pointer value. I've
used it for that purpose myself. (Examining the stack pointer is valuable when
determining whether other pointers are pointing into the stack or not.)
As I replied to Timon, you're drawing a subjective (not objective) line at what
is acceptable or not.
More information about the Digitalmars-d
mailing list