The ASAN build failed due to using pointers to a temporary whose
lifetime had expired.
Updating the libc++ Docker image to Ubuntu Focal caused some breakage.
This was temporary disabled in D112737. This re-enables two of these
tests.
Differential D113137
[libc++] Fix lifetime issues of temporaries. Mordante on Nov 3 2021, 12:53 PM. Authored by
Details
The ASAN build failed due to using pointers to a temporary whose Updating the libc++ Docker image to Ubuntu Focal caused some breakage.
Diff Detail
Event TimelineComment Actions These tests are outside my interest area, so I don't really care what happens with them; and I also don't know much about how format_args is meant to be used; but, does this proposed PR actually fix the dangling, or just hide it enough to fool the tool?
Comment Actions Thanks for the fix. I'd still like to discuss whether we want to file a LWG issue or if I'm misunderstanding the (lack of) importance of this in the user visible API.
|
Style: std::basic_format_args args = format_arg_store; (it's not an aggregate or sequence-container)
Do I understand correctly that std::make_format_args does not actually return a std::format_args? Who came up with that? 😛
But does this fix the dangling? https://en.cppreference.com/w/cpp/utility/format/make_format_args insists that "A formatting argument has reference semantics for user-defined types and does not extend the lifetime of args," so do you really need to do something like
? (Or consider turning each of the following blocks into its own function, and just calling them like test_foo(std::make_format_args<...>(...)); which would eliminate the lifetime issues in a more realistic way: basically by treating format_args as a parameter-only type.)