Frama-C Bug Tracking System - Frama-C
View Issue Details
0000882Frama-CKernelpublic2011-07-06 23:112014-02-12 16:59
yakobowski 
yakobowski 
normalcrashalways
closedfixed 
Frama-C Carbon-20110201 
Frama-C Nitrogen-20111001 
0000882: Cil generates incorrect switch (with missing cases)
frama-c -check crashes on the following code. This is a regression from Boron.

void main () {
  int r;
  switch(1) {
  case 2:
    r = (int) f(1);
    break;
  default:
    break;
  }
}
No tags attached.
Issue History
2011-07-06 23:11yakobowskiNew Issue
2011-07-07 00:26yakobowskiNote Added: 0002019
2011-07-07 00:26yakobowskiAssigned To => virgile
2011-07-07 00:26yakobowskiStatusnew => resolved
2011-07-07 00:34svnCheckin
2011-07-07 00:34svnResolutionopen => fixed
2011-09-07 17:00signolesRelationship addedrelated to 0000912
2011-09-07 18:26yakobowskiRelationship deletedrelated to 0000912
2011-10-10 14:13signolesFixed in Version => Frama-C Nitrogen-20111001
2011-10-10 14:14signolesStatusresolved => closed
2014-02-12 16:59yakobowskiNote Added: 0004767
2014-02-12 16:59yakobowskiAssigned Tovirgile => yakobowski
2014-02-12 16:59yakobowskiStatusclosed => resolved

Notes
(0002019)
yakobowski   
2011-07-07 00:26   
The bug is in the removal of trivial UnspecifiedSequence in Cabs2Cil. The code uses a Cil_datatype.Stmt.Hashtbl, but in Cabs2Cil all sid seem to be -1.

I will use an association list instead, but there are obvious efficiency concerns. Also, I'm not sure (==) is correct at this stage. Virgile, it seems you wrote the original code, can you check the patch?
(0004767)
yakobowski   
2014-02-12 16:59   
Fix committed to stable/neon branch.