Closed Bug 430328 (static_analyses) Opened 14 years ago Closed 3 years ago
[meta] Tracking requests for Static Analyses
This is to make it easier to track ongoing analyses involving *hydras and Pork.
What kind of analyses are expected ?
This is a tracking bug. "Depends on" lists the analyses under way.
i am not familiar with hydra yet. here are some random thoughts. code analysis tools can't be made perfect, so the primary goal should be to be effective imho. refactoring kinda scares me - debugging a program generated by a program generated by program is hard if possible at all. besides a systematic scientific approach, i suggest additional heuristic/chaotic approach - checking for blacklisted constructs that may be dangerous - basically gcc's -Wall on steroids. off the top of my head some checks that may help: 1. assignment in |if| - e.g. |if (a = 1)|. in some cases this is valid, yet it may be a bug 2. misuse of preprocessing macros - macros changing stuff in unexpected ways, e.g. in pseudocode #define max(a,b) ((a)>(b) ? (a) : (b)) ... c=max(a++,b++); this example is kinda fabricated, though i reported a real bug because of similar misuse very useful but probably hard to implement feature will be value reachability: on line X in file Y what are the possible values of int variable Z ? basically Z may be anything, it may be just a singe number, it may be in a given range or in a finite set of ranges.
cppcheck seems interesting static analysis tool: http://sourceforge.net/project/showfiles.php?group_id=195752&package_id=231124&release_id=657693 bugs found by it: http://cppcheck.wiki.sourceforge.net/found_bugs seems nice their goal is to keep false positives very low (sure there are FP)
Attachment #364503 - Attachment description: cppcheck static analysis 2008-02-28, 290 lines → cppcheck static analysis 2009-02-27, 290 lines
> 1. assignment in |if| - e.g. |if (a = 1)| FYI: i patched cppcheck to search for this. the way cppcheck works i am not sure i caught all cases. caught 2 occurrences of this and they look legitimate to me.
Depends on: 483714
i am investigating using hydra for security stuff. http://mxr.mozilla.org/mozilla-central/source/security/manager/ssl/src/nsCrypto.cpp#384 while (isspace(*end)) end--; this will crash in layout: <UNMAPPED> <SPACES> end is it worth a bug? can hydra check for constructs like: while( SINGLECONDITION( *ptr ) ) ptr--; or while( SINGLECONDITION( *ptr ) ) --ptr; i think both of the above are in most cases real crashes.
Depends on: 522774
Depends on: 512868
Depends on: 526143
Depends on: 529382
Depends on: 535646
Depends on: 551569
11 years ago
Depends on: 488941
Summary: Tracking: Moz2 static analyses → Tracking: static analyses
Alias: analyses → static_analysis
Summary: Tracking: static analyses → [meta] Tracking requests for Static Analysis.
Alias: static_analysis → static_analyses
Summary: [meta] Tracking requests for Static Analysis. → [meta] Tracking requests for Static Analyses.
I think we should instead use bug 1287757 with its dependencies. Closing this one.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
3 years ago
Depends on: semmle-analysis
3 years ago
No longer depends on: semmle-analysis
You need to log in before you can comment on or make changes to this bug.