Commit Graph

21827 Commits

Author SHA1 Message Date
Daniel Marjamäki 28c37bb63f Verification; Clarify error message 2020-01-01 08:36:40 +01:00
Daniel Marjamäki 443e8cfbcf Verification; avoid false positive for known float value 2020-01-01 08:33:27 +01:00
Daniel Marjamäki d4ec8075a4 Verification; Fix false positive in while loops 2019-12-31 22:32:16 +01:00
Daniel Marjamäki 043634be27 Verification; Better handling of assignment in while 2019-12-31 20:31:31 +01:00
Daniel Marjamäki 446256a503 Verification; assume non-const pointer argument might point at uninitialized data 2019-12-31 17:51:58 +01:00
Daniel Marjamäki 10010eba95 Verification; Avoid fp for array declaration 2019-12-31 16:50:20 +01:00
Dmitry-Me 1a2b770bfd Break the loop once a match is found 2019-12-31 18:32:45 +03:00
Dmitry-Me 895910b769 Fixed #7159 (wrong handling of function parameters) 2019-12-31 18:26:12 +03:00
Daniel Marjamäki f55d72e821 Verification; uninitialized local variable 2019-12-31 14:57:42 +01:00
Daniel Marjamäki c86a2d6e15 Verification; updated manual 2019-12-31 14:03:12 +01:00
Daniel Marjamäki 48be067dd1 Verification; Added --verify-diff option 2019-12-31 12:05:08 +01:00
Daniel Marjamäki 3af3219076 Verification; Juliet *_float_* division by zero tests 2019-12-31 09:02:06 +01:00
Paul Fultz II 82c91f9484 Fix issue 9550: False positive: Same iterator is used with containers 'x' that are defined in different scopes (#2463) 2019-12-31 08:09:04 +01:00
Daniel Marjamäki 7dcfd3400f Verification; test 2019-12-31 06:08:04 +01:00
Daniel Marjamäki fde86b696d Verification; Use ValueFlow for improved accuracy 2019-12-31 05:59:06 +01:00
Daniel Marjamäki e4b29c6f98 Verification; minor tweak of testcase 2019-12-30 21:18:32 +01:00
Daniel Marjamäki 3ff31b799c Verification: Use separate id for floating point division by zero 2019-12-30 19:50:22 +01:00
Daniel Marjamäki 4b5585e75b Verification; floating point division by zero 2019-12-30 19:47:18 +01:00
Daniel Marjamäki a60efa6774 Verification; Experimental checking for uninit 2019-12-30 18:55:16 +01:00
Daniel Marjamäki 33c8b71467 Revert "addons; import cppcheckdata from local folder"
This reverts commit 05b96d42e9.
2019-12-30 17:30:17 +01:00
Daniel Marjamäki 6ea1875a84 Verification; Ensure assertions for variable type limits are added 2019-12-30 12:53:59 +01:00
Daniel Marjamäki 39a6eefef5 test/testsuites/danmar-verify: Added test cases 2019-12-30 09:44:49 +01:00
Daniel Marjamäki 05b96d42e9 addons; import cppcheckdata from local folder 2019-12-30 09:13:04 +01:00
Daniel Marjamäki d247ffb13a Fix compiler warning 2019-12-29 21:22:20 +01:00
Daniel Marjamäki 29b599b0e5 Verification; callbacks in executeCast 2019-12-29 19:17:36 +01:00
Daniel Marjamäki 9723b28385 Verification; struct pointer member 2019-12-29 18:42:35 +01:00
Daniel Marjamäki 2710a94b4b Verification; Merged handling of pointers and arrays 2019-12-29 16:26:11 +01:00
jannick0 1cef732e1b bug fix - de-escape double backslashes in file paths of #line directives (#2462)
* bug fix - de-escape double backslashes in file paths of #line directives

From merged PR danmar/simplecpp#187.

* externals/simplecpp/simplecpp.cpp:
  - add static function REPLACEALL which replaces a string FROM to the
    string TO at every occurance in the input string.
  - simplecpp::TokenList::readfile: replace any double backslashes in any
    file path of a #line directive.

* externals/simplecpp/simplecpp.cpp: astyling
2019-12-29 14:01:19 +01:00
Paul Fultz II 75de485c4d Fix issue 9551: Out-of-bounds in getLifetimeTokens() (#2461) 2019-12-29 08:23:58 +01:00
Daniel Marjamäki ad352838c0 Verification; Add some more testcases 2019-12-28 22:23:11 +01:00
Daniel Marjamäki d16ea3293e Verification; Fix testing 2019-12-28 22:09:16 +01:00
Wolfgang Stöggl ad8bedebd7 Update cmake_minimum_required VERSION (#2457)
When tests are built, the minimum required cmake version is 3.4.
The file test/CMakeLists.txt uses cmake_policy(SET CMP0064 NEW),
which requires cmake 3.4 [1].

[1] https://cmake.org/cmake/help/v3.4/policy/CMP0064.html
2019-12-28 10:46:13 +01:00
Daniel Marjamäki ab2e87191f Verification; Avoid crash 2019-12-27 20:27:21 +01:00
Daniel Marjamäki 49ed1a82b4 Verification; save report in custom file 2019-12-27 19:25:06 +01:00
Daniel Marjamäki 4b4f7ea60b Verification; Updated report 2019-12-27 19:05:22 +01:00
Dmitry-Me 147cf9319f Restore compilation in gcc-4.6 2019-12-27 18:26:44 +03:00
Georgy Komarov d977761e76 addons: Reduce memory consumption (#2395)
* addons: Reduce memory consumption

Parse dump files incrementaly using ElementTree.iterparse. Clean unused
resources during parsing.  This method is explained in following
article: https://www.ibm.com/developerworks/xml/library/x-hiperfparse/

Memory consumption was reduced about 30% (measured with mprof),
execution time increased about 5% (measured with time utility).
More description available in PR.

* Switch to lxml and update iterparse routines

Use lxml module instead default xml.etree. Lxml provides convenient
wrappers around iterparse method that accepts `tag` argument. That
easer incremental parsing routines to select specific tags from roottree
like `dump` and `dumps`.

Element.clear() method was replaced by `lxml_clean` because lxml
keeps additional information to nodes that should be removed.

Added note about large consumption RAM on large dump files.
This commit doesn't solve this problem completely, but provides a way
to improve current parser to add incremental Configuration serialization
later.

* Working on iterative parser

* Added iterative Configurations parser

* fix

* Fix varlist iteration

* make sure that standards node was loaded
2019-12-27 08:50:56 +01:00
Daniel Marjamäki ec4668353d Verification; Determine argument number properly 2019-12-26 18:32:59 +01:00
Daniel Marjamäki 31bddb6ae0 astyle formatting
[ci skip]
2019-12-26 15:48:29 +01:00
Paul Fultz II ce1fc56e96 Fix issue 6890: ValueFlow: min/max value for variable, after condition (#2460)
* Set bounds when combining values

* Adust bounds when they are negated

* Try to infer conditional values

* Switch false and true

* Fix checking of conditions

* Fix compare

* Fix remaining tests

* Fix overflows
2019-12-26 15:47:53 +01:00
Daniel Marjamäki 8c652afd6e Verification: Added IntRange::isLessThan and IntRange::isGreaterThan 2019-12-26 15:39:08 +01:00
Dmitry-Me 678560bf0d
Use "override" keyword in clang (#2459) 2019-12-25 18:19:00 +03:00
Paul Fultz II 42d44f02a2 Use lifetime analysis for checking mismatching containers (#2456)
* Use lifetimes to check for mismatching containers

* Fix error messages

* Format

* Remove unused variables

* Fix configuration and track iterators through algorithms

* Fix iterator value types in qt config

* Fix library issue with QStringList

* Remove unused functions

* Fix cppcheck errors
2019-12-25 09:32:50 +01:00
Daniel Marjamäki 0cd2935dc7 Verification; Verify that function call argument values meet annotations 2019-12-25 09:23:07 +01:00
Daniel Marjamäki f0ac19514b Verification: Handle Cppcheck annotations __cppcheck_low__ and __cppcheck_high__ 2019-12-24 21:14:14 +01:00
Daniel Marjamäki 755e2d261c Fixed #9402 (ExprEngine: && and || in condition) 2019-12-24 15:52:02 +01:00
orbitcowboy 81bea120fc wxwidgets.cfg: Added support for more interfaces. 2019-12-24 15:40:54 +01:00
orbitcowboy 01c12ce1d9 wxwidgets.cfg: Added support for more interfaces. 2019-12-24 15:35:53 +01:00
Daniel Marjamäki 747a01f74d Verification; Check function argument values 2019-12-23 22:10:43 +01:00
Daniel Marjamäki 270140f1fa manual; add chapter about verification 2019-12-23 16:34:50 +01:00