Frama-C Bug Tracking System - Frama-C
View Issue Details
0000435Frama-CPlug-in > callgraphpublic2010-03-28 22:522018-11-30 10:47
dclist 
signoles 
normalminoralways
closedfixed 
Frama-C Beryllium-20090901 
Frama-C Boron-20100401 
0000435: Too many edges in call graph
For some reason there are three edges on non-recursive function calls
in the dot file produced by frama-c -scg (see attached)

frama-c -scg foo.dot foo.c && dot -Tpng foo.dot

--------------------------------
int fact(int n)
{
    if(n <= 0)
        return 0;
    else
        return fact(n-1);
}

void foo(void)
{
    printf("foo\n");
}

int main(void)
{
    fact(10);
    foo();
}
No tags attached.
? scg-frama.ps (7,343) 2010-03-28 22:52
https://bts.frama-c.com/file_download.php?file_id=73&type=bug
Issue History
2010-03-28 22:52dclistNew Issue
2010-03-28 22:52dclistStatusnew => assigned
2010-03-28 22:52dclistAssigned To => signoles
2010-03-28 22:52dclistFile Added: scg-frama.ps
2010-03-29 10:40signolesNote Added: 0000745
2010-03-29 10:40signolesStatusassigned => resolved
2010-03-29 10:40signolesFixed in Version => Frama-C Bore
2010-03-29 10:40signolesResolutionopen => fixed
2010-03-31 00:24dclistNote Added: 0000749
2010-03-31 00:24dclistStatusresolved => feedback
2010-03-31 00:24dclistResolutionfixed => reopened
2010-03-31 17:09signolesNote Added: 0000750
2010-03-31 17:09signolesStatusfeedback => resolved
2010-03-31 17:09signolesResolutionreopened => fixed
2010-04-13 15:30signolesStatusresolved => new
2010-04-13 15:31signolesStatusnew => closed
2018-11-30 10:47signolesCategoryPlug-in > syntactic callgraph => Plug-in > callgraph

Notes
(0000745)
signoles   
2010-03-29 10:40   
Thanks for your report. This issue is actually already fixed and will be part of the next release.

For info, the three edges was:
- one edge from a function to a function
- one edge from a function to a service root
- one edge from a service root to a service root

BTW the option -scg computes the so-called semantic callgraph (which uses the result of the value analysis plug-in for handling function pointers) while the option -cg computes the so-called syntactic callgraph (which is faster to compute but incorrect in case of function pointers).
(0000749)
dclist   
2010-03-31 00:24   
Is this development source code is not available to the public?
(0000750)
signoles   
2010-03-31 17:09   
No it is private. It is only accessible to Frama-C developers and to industrial partners with a one-to-one contract with us.