[libcxx-commits] [libcxx] [libc++] Fix UB in <expected> related to "has value" flag (#68552) (PR #68733)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 10 11:52:54 PDT 2023


philnik777 wrote:

Thanks for working on this!
I think it would be better to move the initialization into the union, since that would make sure we're not doing anything crazy (since this would enforce the initializtation order). Right now, this looks quite brittle to me. Would you be willing to try that out?

@ldionne This looks like a case where we want to have an optimized test run - especially, since none of the static analyzers or sanitizers caught this.

https://github.com/llvm/llvm-project/pull/68733


More information about the libcxx-commits mailing list