Use-after-free in economy/economy.cc

Bug #1199812 reported by Hans Joachim Desserud on 2013-07-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Undecided
Unassigned

Bug Description

Found by scan-build (llvm 3.3) in r6601

Note that these are two separate reports, though the issues are located in the same file (same function even), thus it probably makes sense to deal with them at the same time.

Hans Joachim Desserud (hjd) wrote :
Hans Joachim Desserud (hjd) wrote :
SirVer (sirver) wrote :

Both are false positives with the same root cause, pretty sure about this. But it not clear from the code that this is so, I added an assert to deal with this.

Changed in widelands:
status: New → Fix Committed
milestone: none → build18-rc1
SirVer (sirver) wrote :

This was in r6604.

Hans Joachim Desserud (hjd) wrote :

Fwiw, they still show up (r6620), even after the assert has been added.

SirVer (sirver) wrote :

Could you update the html file? The current code trace should not be possible with the assert - but maybe I am mistaken.

Changed in widelands:
status: Fix Committed → Incomplete
Hans Joachim Desserud (hjd) wrote :

Here are the updated ones.

Hans Joachim Desserud (hjd) wrote :
SirVer (sirver) wrote :

Thanks - those are false positives now. It does not seem to understand that only ever one flag is removed from the economy.

Changed in widelands:
status: Incomplete → Fix Committed
Hans Joachim Desserud (hjd) wrote :

I just ran a new scan on r6827 with llvm-3.4 and fwiw these issues are no longer listed. In my previous report from October last year they were, and that was run with llvm-3.3. Perhaps the new version of llvm silenced this false positive?

SirVer (sirver) wrote :

Released in build-18 rc1.

Changed in widelands:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers