cclyzer-souffle icon indicating copy to clipboard operation
cclyzer-souffle copied to clipboard

Understanding Callgraph Output/Doing Callgraph Analysis

Open JamesShaker opened this issue 4 years ago • 8 comments

Hello!

I have run cclyzer with the default context-insensitive analysis on:

#include "stdio.h"

void a() {
	printf("Hello world!");
}

int main (int argc, char* argv[]) {
	a();
	return 0;
}

I am interested in the callgraph so I thought the callgraph_edge relation would be what I needed given its declaration:

.decl callgraph_edge(?calleeCtx: Context, ?callee: FunctionDecl, ?callerCtx: Context, ?callerInstr: Instruction)

However when I look at callgraph_edge.csv I get the following results:

<<empty-context>>	</host/hello.bc>:a	<<empty-context>>	<<empty-context>>
<<empty-context>>	</host/hello.bc>:printf	<<empty-context>>	<<empty-context>>

The first, second, and third columns are as I would have expected however in the fourth I was hoping for the caller instruction rather than another context. What am I doing wrong?

Thanks, James

JamesShaker avatar Jul 08 '21 02:07 JamesShaker

Hello James!

This is the current output due to a context-sensitivity related bug, so you are not doing something wrong. We will be fixing this in a overhaul of context-sensitivity in the following days. I will update the issue as soon as we have a fix.

Thank you

ktrianta avatar Jul 08 '21 07:07 ktrianta

Great! Cheers @ktrianta! :)

JamesShaker avatar Jul 08 '21 08:07 JamesShaker

Hey @ktrianta, just wondering if there is any update on when cclyzer might be back up and running?

JamesShaker avatar Aug 05 '21 05:08 JamesShaker

Hello James, I am sorry but I don't have a complete fix yet. I will try to close the issue in the next 1 or 2 weeks. Thank you for your patience!

ktrianta avatar Aug 05 '21 05:08 ktrianta

No worries, not a problem at all! 🙂

On 5 Aug 2021, at 3:58 pm, Konstantinos Triantafyllou @.***> wrote:

 Hello James, I am sorry but I don't have a complete fix yet. I will try to close the issue in the next 1 or 2 weeks. Thank you for your patience!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

JamesShaker avatar Aug 05 '21 07:08 JamesShaker

Hello! Sorry to bother you again! Is there any updated timeline on when this repo might be working again? Also do you have any suggested previous commits in which the repo was in a working state?

JamesShaker avatar Oct 27 '21 23:10 JamesShaker

Hello, we will have a fix available by tomorrow most probably!

ktrianta avatar Oct 28 '21 23:10 ktrianta

@JamesShaker I have pushed a fix! I am not closing this issue yet. In case you encounter any trouble please write here!

ktrianta avatar Oct 29 '21 21:10 ktrianta