Frama-C Bug Tracking System - Frama-C
View Issue Details
0000954Frama-CPlug-in > metricspublic2011-09-09 08:412014-02-12 16:59
Assigned Tovirgile 
PrioritynormalSeveritycrashReproducibilityhave not tried
PlatformOSOS Version
Product VersionFrama-C GIT, precise the release id 
Target VersionFixed in VersionFrama-C Nitrogen-20111001 
Summary0000954: failure: bad initialisation: Too many initializations of the AST
DescriptionCrash with option -metrics -metrics-ast cabs when applied on project built by another (i.e. volatile and slicing) plug-in.
Additional InformationRevision: 15055

> cat file.c
int v;
int main(int x) {
  return v;

>frama-c -slice-return main file.c -then-on "Slicing export" -metrics -metrics-ast cabs
[kernel] failure: bad initialisation: Too many initializations of the AST
[kernel] The full backtrace is:
Called from file "src/metrics/", line 557, characters 21-44
TagsNo tags attached.
Attached Files

2011-09-09 09:51   
(Last edited: 2011-09-09 09:56)
This crash seems to happen because the newly created project has no Cabs AST.
Possible fix: provide a way to signal the absence of Cabs in projects.

SVN revision 15057 renders message output clearer (Kernel.fatal "bad initialisation" and Ast.Bad_Initialization produced much too similar output) , catches this fatal message in the Metrics plugin, and tries to give a possible explanation. The suggested fix above should will probably mitigate this need.

2014-02-12 16:59   
Fix committed to stable/neon branch.

Issue History
2011-09-09 08:41patrickNew Issue
2011-09-09 08:41patrickStatusnew => assigned
2011-09-09 08:41patrickAssigned To => rbonichon
2011-09-09 09:51rbonichonNote Added: 0002223
2011-09-09 09:51rbonichonStatusassigned => acknowledged
2011-09-09 09:56rbonichonNote Edited: 0002223
2011-09-09 09:57rbonichonStatusacknowledged => assigned
2011-09-09 09:57rbonichonAssigned Torbonichon => virgile
2011-09-26 11:05svn
2011-09-26 11:05svnStatusassigned => resolved
2011-09-26 11:05svnResolutionopen => fixed
2011-10-10 14:13signolesFixed in Version => Frama-C Nitrogen-20111001
2011-10-10 14:14signolesStatusresolved => closed
2013-12-19 01:12Source_changeset_attached => framac master e8d04a4b
2014-02-12 16:54Source_changeset_attached => framac stable/neon e8d04a4b
2014-02-12 16:59Note Added: 0004731
2014-02-12 16:59Statusclosed => resolved