▲ | gpderetta 4 days ago | |
Either there is no provenance, forging is allowed and the optimization is disallowed; or there is provenance and forging the pointer and attempting to inspect (or modify) the value of *ptr in bar() is UB. | ||
▲ | ncruces 4 days ago | parent | next [-] | |
You never converted ptr to an integer. If you did, if the pointer escapes, yes, I claim that then the allocation can't be optimized away. Why is that so bad? | ||
▲ | torstenvl 4 days ago | parent | prev [-] | |
Attempting to inspect or modify the value of *ptr in bar() through a forged pointer was always UB. You are saying absolutely nothing meaningful. |