[libcxx-commits] [PATCH] D99624: [libc++] Remove UB in std::list

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Apr 15 14:49:20 PDT 2021


Quuxplusone added a comment.

@akhuang wrote:

> Are there still concerns about [this patch]? IIUC the main concern is whether the original code was UB or not, which is asking whether `__list_node` is an implicit-lifetime type (or could be made to be one)?

I've been persuaded that `__list_node` is not (currently) an implicit-lifetime type, and therefore the original code does have UB. (I'm still not 100% sure, but I'm no longer arguing against the premise.) I'm also not sure if it's possible to make `__list_node` an implicit-lifetime type, but again I'm willing to assume it's not possible, and therefore (1) yes there's UB, and (2) yes this is a good direction to solve it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99624



More information about the libcxx-commits mailing list