2021-01-22 21:05 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000472Frama-CPlug-in > Evapublic2014-02-12 16:55
Reporteryakobowski 
Assigned Topascal 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
Product VersionFrama-C Boron-20100401 
Target VersionFixed in VersionFrama-C Carbon-20101201-beta1 
Summary0000472: Comparing a function pointer will NULL might raise incorrect warning
DescriptionIn the code below, the value analysis flags the comparison of fun with the NULL pointer as requiring a comparability assertion, while a comparison with the NULL pointer is always legal.

void f(void);
void g(void);

extern int j;

int main (void) {
  void (*fun)(void);
  int* p;
  
  if(j) fun = f; else fun = g;
   
  if (fun == 0) return 0; else return 1;
}


(The problem does not appear if 'fun' is a pointer to only one function, or when comparing non-functional pointers.)
TagsNo tags attached.
Attached Files

-Relationships
+Relationships

-Notes

~0000823

pascal (reporter)

"imprecise", not "incorrect".

~0000910

signoles (manager)

Fixed by PC yesterday.
+Notes

-Issue History
Date Modified Username Field Change
2010-05-07 12:35 yakobowski New Issue
2010-05-07 12:35 yakobowski Status new => assigned
2010-05-07 12:35 yakobowski Assigned To => pascal
2010-05-10 23:49 pascal Note Added: 0000823
2010-06-03 19:39 svn
2010-06-04 22:24 signoles Note Added: 0000910
2010-06-04 22:24 signoles Status assigned => resolved
2010-06-04 22:24 signoles Fixed in Version => Frama-C Carbon
2010-06-04 22:24 signoles Resolution open => fixed
2010-12-17 19:36 signoles Status resolved => closed
2013-12-19 01:13 pascal Source_changeset_attached => framac master ce6b7d50
2014-02-12 16:55 pascal Source_changeset_attached => framac stable/neon ce6b7d50
2018-01-12 14:26 signoles Category Plug-in > value analysis => Plug-in > Eva
+Issue History