[clang] [Clang] More aggressively mark this* dead_on_return in destructors (PR #183347)
Florian Hahn via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 1 09:49:59 PDT 2026
fhahn wrote:
> > Not sure if there is anything in the repro that makes it UB that I missed.
>
> It's the same issue as [steveicarus/iverilog#1311](https://github.com/steveicarus/iverilog/pull/1311). The allocator is writing to the object being deleted within `operator delete`, which as far as I'm aware is not allowed.
But at the point when operator delete gets the pointer passed, the object does not exist anymore, but isn't the underlying storage is still valid? So in the example, we would not write the object, but to the underlying storage.
Besides writing, couldn't the allocator still keep around pointers to the underlying storage in general?
https://github.com/llvm/llvm-project/pull/183347
More information about the cfe-commits
mailing list