StoredRange can store an optionally-deleted unique_ptr#3332
StoredRange can store an optionally-deleted unique_ptr#3332jwpeterson merged 1 commit intolibMesh:develfrom
Conversation
* Also add some libmesh_asserts in StoredRange::reset() to catch the case where a range is reset() but the _objs pointer was not initialized. * Use lambdas to define the custom deleter. The decision to delete/not is made at construction time, and does not change during the object's lifetime. * One thing I am not 100% happy with is that we still need to call 'new' when allocating the class unique_ptr, since one cannot really use std::make_unique when a custom deleter is employed. https://stackoverflow.com/questions/21788066/using-stdmake-unique-with-a-custom-deleter * Use ptr_type typedef for improved readability * Add required C++ includes.
|
So we have a randomly failing Min clang target, is that correct? |
|
Yup. In MetaPhysicL. I'll see if I can replicate it locally. |
|
Well, that's fun. With clang-11, I can run MetaPhysicL |
|
I'm getting the same non-deterministic failures from clang 13 and 14, and gcc 9 and 11; this has got to be our problem, not a compiler issue. Unless it's an issue with something else in the environment? I went to an older Linux box to try clang 10, the compiler in our failing CI runs, and that turns out to be happy to make thousands of runs without a hiccup. |
|
... I'll fix it. |
|
OK, sounds good. From what I could see, the metaphysicl test suite doesn't yet output the name of the test which failed (?) but that would be useful for trying to diagnose problems via CIVET... since I don't think the unit test log can be downloaded as part of the results. |
where a range is reset() but the _objs pointer was not initialized.
is made at construction time, and does not change during the object's
lifetime.
when allocating the class unique_ptr, since one cannot really use
std::make_unique when a custom deleter is employed.
https://stackoverflow.com/questions/21788066/using-stdmake-unique-with-a-custom-deleter