Some cleanup needed
Bug #1166168 reported by
Jiri Srba
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
VerifyDTAPN |
Fix Released
|
Undecided
|
Peter Gjøl Jensen |
Bug Description
Referring to line numbers in the merge proposal
https:/
1) The file src/DiscreteVer
2) The lines
2569 + void Release() const {
2570 + delete[] shadow;
2571 + }
seems a little dodgy? Shouldn't this be in the destructor?
3) The file src/DiscreteVer
4) The file src/DiscreteVer
5) The comment "//possible mem-leek?" in line 3807 seems like it should be investigated?
Related branches
lp:~verifydtapn-contributers/verifydtapn/CutOptimization
- Mathias Grund Sørensen: Approve
- Jiri Srba: Approve
- Jakob Taankvist: Approve
- verifydtapn-contributers: Pending requested
-
Diff: 163 lines (+8/-78)5 files modifiedsrc/DiscreteVerification/DataStructures/NonStrictMarkingBase.cpp (+6/-12)
src/DiscreteVerification/VerificationTypes/LivenessSearch.cpp (+1/-32)
src/DiscreteVerification/VerificationTypes/LivenessSearch.hpp (+0/-1)
src/DiscreteVerification/VerificationTypes/ReachabilitySearch.cpp (+1/-32)
src/DiscreteVerification/VerificationTypes/ReachabilitySearch.hpp (+0/-1)
lp:~verifydtapn-contributers/verifydtapn/Cleanup
- Peter Gjøl Jensen: Approve
- Mathias Grund Sørensen: Approve
- Jiri Srba: Approve
- Jakob Taankvist: Approve
-
Diff: 85 lines (+5/-47)4 files modifiedsrc/DiscreteVerification/DataStructures/EncodingStructure.cpp (+0/-14)
src/DiscreteVerification/DataStructures/NonStrictMarking.cpp (+0/-15)
src/DiscreteVerification/DataStructures/PData.cpp (+0/-16)
src/DiscreteVerification/DataStructures/PData.h (+5/-2)
Changed in verifydtapn: | |
status: | In Progress → Fix Committed |
Changed in verifydtapn: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
2 ) We do not necessearily want to delete the "shadow"-data (should be refactored later!) when the object is deallocated. If it was moved to the constructor, the PTrie implementation would break. It sometimes just "moves" data to a new object - this is an optimization to remove uneeded memory-allocation; removes practically seven of eigth needed calls to malloc.
The behavior can be observed in lines 366-391 of PData.h, lines 373 and 390 are interesting. The code handles moving a bucket (or parts thereof). Note that "EncodingStructure" objects are allocated in a consecutive array, and cannot be reused.
5 ) Constructor never used, removed. The following constructer is similar; it does not cause memory-leak, it is the desired behavior to copy enough data to recreate the marking. Added comments in code explaning the issue.
Empty files are removed, fix-branch is lp:~verifydtapn-contributers/verifydtapn/Cleanup.