dr_checker icon indicating copy to clipboard operation
dr_checker copied to clipboard

Memory leakage and double free

Open Lawliar opened this issue 5 years ago • 1 comments

Good work but the allocated memory seems handled not very well, there are a few memory errors.

  1. double free https://github.com/ucsb-seclab/dr_checker/blob/speedy/llvm_analysis/MainAnalysisPasses/SoundyAliasAnalysis/include/AliasObject.h#L251 This line only free the memory, the vector still has the element.

  2. Memory leaking https://github.com/ucsb-seclab/dr_checker/blob/speedy/llvm_analysis/MainAnalysisPasses/SoundyAliasAnalysis/include/ModuleState.h#L131

Lawliar avatar Jan 12 '20 01:01 Lawliar

For the double free, although the vector is cleared after the delete operation, a double free is still triggered when cleaning up the global state.

Any help is appreciated.

Lawliar avatar Jan 12 '20 01:01 Lawliar