Frama-C Bug Tracking System - Frama-C
View Issue Details
0000758Frama-CPlug-in > sparecodepublic2011-03-21 10:412011-10-10 14:14
pherrmann 
Anne 
normalmajoralways
closedfixed 
Frama-C Carbon-20110201 
Frama-C Nitrogen-20111001 
0000758: Sparecode removes definitions which should be kept.
Sparecode removes definitions which should be kept. See attached file bugspare.c. Perform sparecode analysis, then value analysis on resulting code. frama-c-gui -sparecode-analysis /opt/bugspare.c -then-on "default without sparecode" -val First analysis is correct: the function pointer gets a correct value. After spare code analysis, some definitions are incorrectly removed (in particular, classInfo_ARedef), and the function pointer takes an uninitialized value.
No tags attached.
c bugspare.c (962) 2011-03-21 10:41
https://bts.frama-c.com/file_download.php?file_id=184&type=bug
Issue History
2011-03-21 10:41pherrmannNew Issue
2011-03-21 10:41pherrmannStatusnew => assigned
2011-03-21 10:41pherrmannAssigned To => Anne
2011-03-21 10:41pherrmannFile Added: bugspare.c
2011-03-21 10:43pherrmannProduct VersionFrama-C GIT, precise the release id => Frama-C Carbon-20110201
2011-03-21 10:43pherrmannSummary12380 => Sparecode removes definitions which should be kept.
2011-03-21 13:54AnneNote Added: 0001613
2011-03-21 13:54AnneStatusassigned => acknowledged
2011-03-21 14:08AnneNote Added: 0001614
2011-03-21 14:41AnneNote Deleted: 0001614
2011-03-21 14:45AnneNote Added: 0001615
2011-03-21 15:05pherrmannNote Added: 0001616
2011-03-21 15:05pherrmannStatusacknowledged => resolved
2011-05-16 17:28signolesResolutionopen => fixed
2011-10-10 14:13signolesFixed in Version => Frama-C Nitrogen-20111001
2011-10-10 14:14signolesStatusresolved => closed

Notes
(0001613)
Anne   
2011-03-21 13:54   
Ok. I think that it is because the analysis doesn't go into global variables initialization, but I have to check...
(0001615)
Anne   
2011-03-21 14:45   
The problem was that the variable [tObjectRefInfo] is first declared, the used, then initialized later. It was assumed that a variable was declared and initialized before it was used... This will be fixed by my next commit, but please check that the obtained result is correct.
(0001616)
pherrmann   
2011-03-21 15:05   
I checked: the bug is corrected as of svn rev 12388.