-
Notifications
You must be signed in to change notification settings - Fork 8
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
some static analysis results #35
Comments
Yes, please do! We can then decide if we fix things in one big change of lots of small ones, or something. |
Certainly: |
Thanks! I am having a quick look at the reports, and some of them are indeed false alerts. It is very creative in finding execution paths, but it doesn't realise that the 4 cases in the switch in the very first report do indeed cover all possibilities, and there is no separate default case needed. Some other cases look more plausible though! |
Here are some observations about some pseudo-randomly chosen reports. I label them with their final path component. report-e6351b.html kn10cpu.c Assigned value is garbage or undefinedFalse positive. At step 33 / line 1178 there is no "default" branch since all possible cases are covered. report-44bd54.html vmtape.c Assigned value is garbage or undefinedYes.. At line 3049, nput always gets set IF report-b20600.html tapedd.c Assigned value is garbage or undefinedYes. There should be a report-34b049.html kn10pag.c Branch condition evaluates to a garbage valueFalse positive. At step 9 / line 605 there is no "default" branch since all possible cases are covered. report-2dedf0.html vmtape.c Use-after-freeThis one is a bit more interesting. The function call at line 3931 free()s ETA: I could see a NULL ptr reference in this loop, if there is only one element in the circular list. Then That's it, so far. |
I decided to feed the source (well, the ITS build, for the moment) through the scan-build utility, and it did indeed turn up a bunch of issues, some of which are trivial patches (e.g. unused or uninitialized variables), others (use-after-frees, for example) that are probably best subject to the gaze of someone who has actually spent time with the code, and in any event I don't want to step on anyone's toes. Would it be best just to attach the results for people to pick over?
The text was updated successfully, but these errors were encountered: