Skip to content
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

Check Results are cached? - need 2nd SAVE to show correct results #150

Open
JuergenAStrauss opened this issue Mar 22, 2016 · 1 comment
Open
Labels

Comments

@JuergenAStrauss
Copy link

After changing source code and saving changes using Ctrl-S in Visual Studio, the cppCheck result page does not show correct content. A second SAVE action (Ctrl-S) is needed to bring up current results. This behavior is misleading / confusing to developers.

Example code:
void test1() { char *p = malloc(10); char *q = malloc(10); }
After saving, the result page shows 2 errors (memory leak on p and q).
Now change source code to:

void test1() {    char *p = malloc(10);   char *q = malloc(10);
while (1>0) {   char *pp = malloc(10);   char *zz = malloc(10);  } }  

After saving this code, the result page shows 2 errors: "memory leak on q and pp".
Now save a second time, and the result page shows the result: "memory leak on pp and zz".
(note the change in variable name q -> zz).
This result now is stable for all following SAVE actions.
The behavior can be reproduced any time.

Of course, cppCheck should report also memory leaks on all variables, but this will be a separate issue for cppCheck, not for this VS plugin. This issue addresses the caching behavior of the result page only.

Some context data:

  • VisualStudio 2015 Enterprise
  • cppcheck-1.72-x64
  • plugin version: 1.3.2
@VioletGiraffe
Copy link
Owner

I've noticed this as well a couple times. There's no cache per se and it's definitely not the intended behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants