@dcoughlin Any advice on how to handle different stdlib implementations?
Can we conjure a separate symbol instead of relying on a particular struct layout?
For now this implementation will simply not go inside a differently implemented call_once.
I think that for now your solution is the best to avoid the crashes. Let's see what Alexander has to say about the standard library causing the crashes. Ideally, we don't want to fall down too hard on libstdc++.
If we really need to handle a variety of standard libraries (or versions of standard libraries) we'll probably want to to treat std::call_once more abstractly and write a checker that models its behavior instead of body farming it.
|365 ↗||(On Diff #118258)|
LLVM style is to write this null check as if (!FlagCXXDecl).
|369 ↗||(On Diff #118258)|
This return will leak the allocated AST nodes (as will the return for __state__ below). Can you hoist the validation checks to above the AST creation?