[libcxx-commits] [PATCH] D130330: [libc++][NFC] Add checks for lifetime issues in classic algorithms.

Hui via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jul 22 05:03:46 PDT 2022


huixie90 added a comment.

I think this is good. But I'd like to clarify the idea behind it.  IIUC, the idea is that

- there is a global object pool of ptrs
- the class's destructor removes this from the global pool
- every operation assert this is inside the pool

But if the object destructor has been run, it is UB to call its member function. and since it is UB , those `assert` in theory is not guaranteed to run


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130330/new/

https://reviews.llvm.org/D130330



More information about the libcxx-commits mailing list