2021-01-27 12:40 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000892Frama-CKernelpublic2014-02-12 16:59
Reporteryakobowski 
Assigned Tomonate 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
Product VersionFrama-C Carbon-20110201 
Target VersionFixed in VersionFrama-C Nitrogen-20111001 
Summary0000892: Cil wrongly authorizes references to local variables in static arrays
Descriptionframa-c -check crashes on the following code.

int tab[16];

void* main(void)
{
  int i;

  static const int* t[] = {
    &tab[1],
    &tab[3],
    &tab[4],
    &i
  };

  return &t;
}

Declaring t as static causes Cil to lift the array to the global scope of the module, but this is incorrect because of &i. I think the program is incorrect in the first place, but Cil should reject it, instead of silently producing a wrong AST.
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0004751

monate (reporter)

Fix committed to stable/neon branch.
+Notes

-Issue History
Date Modified Username Field Change
2011-07-26 12:24 yakobowski New Issue
2011-07-26 12:24 yakobowski Status new => assigned
2011-07-26 12:24 yakobowski Assigned To => virgile
2011-08-04 17:07 svn
2011-08-04 17:07 svn Status assigned => resolved
2011-08-04 17:07 svn Resolution open => fixed
2011-10-10 14:13 signoles Fixed in Version => Frama-C Nitrogen-20111001
2011-10-10 14:14 signoles Status resolved => closed
2013-12-19 01:12 svn Source_changeset_attached => framac master a0e6418b
2014-02-12 16:54 monate Source_changeset_attached => framac stable/neon a0e6418b
2014-02-12 16:59 monate Note Added: 0004751
2014-02-12 16:59 monate Assigned To virgile => monate
2014-02-12 16:59 monate Status closed => resolved
+Issue History