-
Notifications
You must be signed in to change notification settings - Fork 273
goto-instrument --model-argc-argv: Explicitly initialise argc, argv #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
80f9e9b
to
0d933a0
Compare
0d933a0
to
79b2e16
Compare
eaf7ed1
to
87e6aed
Compare
87e6aed
to
7ae0e17
Compare
7ae0e17
to
12b28e2
Compare
return false; | ||
} | ||
|
||
// set the size of ARGV storage to 4096, which matches the minium |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minimum
@@ -0,0 +1,157 @@ | |||
/*******************************************************************\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this C-specific and should therefore go into ansi-c/ ?
A language-independent version would be appreciate so that it works also for Java.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It currently indeed is C specific, and the updated version includes an explicit check for mode==ID_C. I would, however, appreciate any work for supporting Java.
// add __CPROVER_assume if necessary (it might exist already) | ||
if(it->first=="__CPROVER_assume") | ||
symbol_table.add(it->second); | ||
else if(it->first=="__CPROVER_initialize") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens to the global variable initializations?
I think this looks good and just needs a rebase. |
Warn when --model-argc-argv is used for main functions without arguments
12b28e2
to
ed92d87
Compare
I have addressed all comments, rebased, and added a regression test. That test, however, is only truly meaningful once #453 is merged. |
Programs using argc and argv need to have these set up properly. This patch introduces an instrumentation achieving this.