fix(kernel/expr): memory corruption in dealloc method
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
8adf6e25ef
commit
a7c6c3e840
1 changed files with 1 additions and 3 deletions
|
@ -328,11 +328,9 @@ expr mk_sort(level const & l) { return cache(expr(new (get_sort_allocator().allo
|
|||
// =======================================
|
||||
|
||||
typedef buffer<expr_cell*> del_buffer;
|
||||
MK_THREAD_LOCAL_GET_DEF(del_buffer, get_dealloc_buffer)
|
||||
|
||||
void expr_cell::dealloc() {
|
||||
try {
|
||||
del_buffer & todo = get_dealloc_buffer();
|
||||
del_buffer todo;
|
||||
todo.push_back(this);
|
||||
while (!todo.empty()) {
|
||||
expr_cell * it = todo.back();
|
||||
|
|
Loading…
Reference in a new issue