[libcxx-commits] [libcxx] Add exception guard for constructor vector(n, x, a) (PR #113086)

A. Jiang via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 21 19:56:44 PDT 2024


https://github.com/frederick-vs-ja commented:

I think I've found the memory leaking case that can be fixed by this PR ([Godbolt link](https://godbolt.org/z/dWeqsGM7n)).

Could you add a new `.pass.cpp` to `libcxx/test/libcxx/containers/sequences/vector/vector.cons` which asserts that memory leak doesn't raise from this constructor when an exception is thrown?

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


More information about the libcxx-commits mailing list