Use-after-free in economy/economy.cc

Bug #1199812 reported by Hans Joachim Desserud
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
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.

Tags: memory
Revision history for this message
Hans Joachim Desserud (hjd) wrote :
Revision history for this message
Hans Joachim Desserud (hjd) wrote :
Revision history for this message
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
Revision history for this message
SirVer (sirver) wrote :

This was in r6604.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

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

Revision history for this message
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
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Here are the updated ones.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :
Revision history for this message
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
Revision history for this message
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?

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.