> Am 10.12.2023 um 12:21 schrieb Alexander Monakov <amona...@ispras.ru>:
>
>
> On Sun, 10 Dec 2023, Richard Biener wrote:
>
>>> It seems wrong to me: CLOBBER_EOL is documented to mean that the storage is
>>> expiring at that point as well, which a (pseudo-)destructor does not imply;
>>> it's perfectly valid to destroy an object and then create another in the
>>> same storage.
>>>
>>> We probably do want another clobber kind for end of object lifetime. And/or
>>> one for beginning of object lifetime.
>>
>> There’s not much semantically different between UNDEF and end of object but
>> not storage lifetime? At least for what middle-end optimizations do.
>>
>> EOL is used by stack slot sharing and that operates on the underlying
>> storage,
>> not individual objects live in it.
>
> I thought EOL implies that ASan may poison underlying memory. In the respin
> of the Valgrind interop patch we instrument CLOBBER_UNDEF, but not
> CLOBBER_EOL.
EOL is like free (), while UNDEF is more
Like malloc ().
Richard
> Alexander