3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-29 07:27:57 +00:00

Fix race condition in smt_tactic::collect_statistics

Co-authored-by: levnach <5377127+levnach@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-07-02 23:34:49 +00:00
parent f094053cd0
commit bee55f1466

View file

@ -101,8 +101,9 @@ public:
void collect_statistics(statistics & st) const override {
if (m_ctx)
m_ctx->collect_statistics(st); // ctx is still running...
smt::kernel * local_ctx = m_ctx; // Capture pointer to avoid race condition
if (local_ctx)
local_ctx->collect_statistics(st); // ctx is still running...
else
st.copy(m_stats);
}