Fix bug reported by Valgrind. Reason: m_metavars is a vector of metavar_info; each metavar_info has a context; when we invoke mk_metavar the vector can grow in size, and the context is moved to a new location. The previous location is invalidated. To avoid the problem we have to save ctx in a local variable.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
9522048390
commit
57c0c69872
1 changed files with 2 additions and 1 deletions
|
@ -121,7 +121,8 @@ class elaborator::imp {
|
|||
if (m_metavars[midx].m_type) {
|
||||
return m_metavars[midx].m_type;
|
||||
} else {
|
||||
expr t = mk_metavar(m_metavars[midx].m_ctx);
|
||||
context ctx = m_metavars[midx].m_ctx;
|
||||
expr t = mk_metavar(ctx);
|
||||
m_metavars[midx].m_type = t;
|
||||
return t;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue