Re: Is gcc allowed to eliminate writes in a destructor?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20 May 2015 at 10:49, Avi Kivity wrote:
> He's talking about an incorrect program.  Wiping the object can detect a
> use-after-free or otherwise cause the program to crash earlier rather than
> later.

I know. My point is that the compiler is always allowed to perform
optimisations that are invisible to correct programs.

An incorrect program has undefined behaviour, and not seeing those
writes happen is one possible way that undefined behaviour can express
itself.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux