Partial static analysis of error paths
Partial static analysis of error paths
Posted Jan 5, 2015 10:06 UTC (Mon) by mtorni (guest, #3618)Parent article: The "too small to fail" memory-allocation rule
I was thinking of checking all the execution paths (disregarding loops)
and producing a report of all possible cases of remaining allocations and not-rolled-back actions. For a simple function the report would be the "happy case" (several allocations in effect, perhaps a lock) and "failure" (no allocations and locks in effect after exit). If the function had error-handling bugs, there would be also be partial exit cases (some allocations in force, perhaps a lock).
Might be some work to implement, but the reports could be great for verification of code before commits.