mirror of
https://github.com/Z3Prover/z3
synced 2025-07-28 23:17:56 +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:
parent
f094053cd0
commit
bee55f1466
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue