Frama-C Bug Tracking System

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000892Frama-CKernelpublic2011-07-26 12:242014-02-12 16:59
Reporteryakobowski 
Assigned Tomonate 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
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

-  Notes
(0004751)
monate (reporter)
2014-02-12 16:59

Fix committed to stable/neon branch.

- 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 Checkin
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
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


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker