diff options
author | Dan Liew <daniel.liew@imperial.ac.uk> | 2015-12-17 11:43:34 +0000 |
---|---|---|
committer | Dan Liew <daniel.liew@imperial.ac.uk> | 2015-12-17 17:23:27 +0000 |
commit | a0ef27ead67dcc9595585f58f80303cc80ef8dfb (patch) | |
tree | 35987eee65e150f38ea7aedaec83c2e93493b359 /utils | |
parent | b2e64702cc1ebb1ffe01a32ebde0f179bf09c337 (diff) | |
download | klee-a0ef27ead67dcc9595585f58f80303cc80ef8dfb.tar.gz |
Fix a memory leak in ``UpdateList`` detected by AddressSanitizer.
The overloaded assignment operator previously only deleted the head ``UpdateNode`` if the ``UpdateList`` had exclusive ownership which left the remaining list of ``UpdateNode``s dangling if those nodes had ``refCount`` of 1. To fix this the logic that was previously in the ``UpdateList`` destructor for deleting nodes that were exclusively referenced by the UpdateList has been moved into ``UpdateList::tryFreeNodes()`` so that it can be called from ``UpdateList::operator=()``. It looks like this bug has been in KLEE since the beginning.
Diffstat (limited to 'utils')
-rw-r--r-- | utils/sanitizers/lsan.txt | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/utils/sanitizers/lsan.txt b/utils/sanitizers/lsan.txt index 10286657..93826a7d 100644 --- a/utils/sanitizers/lsan.txt +++ b/utils/sanitizers/lsan.txt @@ -12,7 +12,6 @@ leak:lib/Expr/Parser.cpp # These are bad, these definitely need fixing leak:klee::Array::CreateArray -leak:klee::UpdateList::extend leak:klee::ConstantExpr::alloc leak:klee::ConcatExpr::alloc leak:klee::ReadExpr::alloc |