DonatNagyE wrote: > Hmm, it really worries me that `MallocChecker` is setting a return value > outside of `evalCall()`. This can easily lead to conflicts if multiple > checkers try to do this: `evalCall()` is protected from conflicts (the engine > asserts that at most one checker evaluates each call) but `checkPostCall()` > isn't. > > To the best of my knowledge, the only legal way to use `State->BindExpr(...)` > in a checker is to set the return value in `evalCall()`. Ideally we should > have an assertion about this ("Environment is unchanged after checker > callback invocation, unless the callback is a successful `evalCall()`").
I agree and there's already a FIXME which suggests moving this modeling step into an EvalCall callback. If you feel that this is an important improvement, I could create a separate commit that does it. https://github.com/llvm/llvm-project/pull/72402 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits