Daniel Marjamäki
55433fce40
Library: added bufferSize parameters
2019-03-20 19:26:57 +01:00
versat
0372c9cde6
gtk.cfg: Add buffer-size attribute to `alloc` entries.
2019-03-20 16:30:28 +01:00
versat
e8c2ea5db2
qt.cfg: Add support for QApplication::translate().
2019-03-20 16:27:15 +01:00
versat
45b1c717ae
gtk.cfg: Add support for g_object_(get|set)_data[_full]().
2019-03-20 16:10:18 +01:00
Sebastian
597107ac9a
.travis.yml: update to xenial; add jobs for ubsan and asan ( #1745 )
...
As tested by @matthiaskrgr in the branch
https://github.com/matthiaskrgr/cppcheck/commits/travis_xenial
Add job to build Cppcheck on Ubuntu 14.04 trusty (same as for precise).
2019-03-20 15:30:01 +01:00
versat
b6953a46d7
qt.cfg: Fixes, enhancements and adding argument directions.
2019-03-20 14:33:29 +01:00
Sebastian
432c04281a
Libraries: Move valloc() from std.cfg to posix.cfg. ( #1743 )
...
Move valloc() to posix.cfg since it is a legacy POSIX function and not
part of the standard (not even commonly used). It is not available in
msvc (Visual Studio).
2019-03-20 14:10:36 +01:00
Daniel Marjamäki
14528bcf25
Library: allowed values for the buffer-size attribute: malloc/calloc/strdup
2019-03-20 06:46:55 +01:00
Daniel Marjamäki
031362ae01
CheckBufferOverrun: Fix false positive
2019-03-19 21:07:08 +01:00
versat
9b6b94336c
gnu.cfg: Add buffer-size to xmalloc; add some __builtin_*() functions.
2019-03-19 15:24:02 +01:00
Daniel Marjamäki
6cbe818f1a
Fix uninitialized variable usage
2019-03-19 13:17:27 +01:00
Daniel Marjamäki
a0e58f0039
Revert "Revert "CheckBufferOverrun: Handle multidimensional arrays""
...
This reverts commit 9d1755f449
.
2019-03-19 13:16:22 +01:00
Daniel Marjamäki
9d1755f449
Revert "CheckBufferOverrun: Handle multidimensional arrays"
...
This reverts commit e98a4a6f14
.
2019-03-19 13:13:29 +01:00
Daniel Marjamäki
e98a4a6f14
CheckBufferOverrun: Handle multidimensional arrays
2019-03-19 09:29:32 +01:00
Paul Fultz II
774464eabb
Fix issue 8996: False positive duplicateCondition
...
This fixes issue 8996 by improving the alias checking by using lifetime analysis. It also extends the lifetime checker to handle constructors and initializer lists for containers and arrays.
2019-03-19 06:25:10 +01:00
versat
d3893a2b3f
Run dmake
2019-03-18 13:39:42 +01:00
versat
bb7888e70b
gnu.cfg: Add support for pvalloc() and __builtin_alloca().
2019-03-18 11:44:35 +01:00
versat
992e1293b7
ruby.cfg: Configure rb_raise() as `noreturn` function.
...
rb_raise() exits the function and returns to the ruby script.
Used for example to exit a function if arguments are not valid.
2019-03-18 10:04:29 +01:00
Daniel Marjamäki
d1025ce76d
Added testcases from 'duma' package
2019-03-18 06:58:12 +01:00
Rikard Falkeborn
794f65bac1
Handle prefixed strings and characters in Token ( #1742 )
...
This makes it possible to call getStrLength() and similar functions
before the tokenizer is called.
2019-03-18 06:18:25 +01:00
Daniel Marjamäki
b53a2e5dc4
CheckBufferOverrun: restore minsize code
2019-03-17 20:34:49 +01:00
Daniel Marjamäki
03f8535c71
Better multiline warning when there is buffer overflow
2019-03-17 20:12:02 +01:00
Daniel Marjamäki
3c85d8a8ac
ValueFlow: Better info for buffer size values
2019-03-17 19:02:36 +01:00
Sebastian
19e9e42dd7
Library: Enhance minsize configuration and allow simple values. ( #1736 )
...
Some POSIX and Windows functions require buffers of at least some
specific size. This is now possible to configure via for example this
minsize configuration: `<minsize type="value" value="26"/>`.
The range for valid buffer size values is 1 to LLONG_MAX
(9223372036854775807)
2019-03-17 14:22:26 +01:00
Daniel Marjamäki
0771929518
Buffer overflow: Handling of dynamically allocated buffer
2019-03-17 13:40:56 +01:00
Daniel Marjamäki
92f4113b59
Array index: Checking array index out of bounds for dynamic buffers
2019-03-17 13:09:15 +01:00
Daniel Marjamäki
18668a52b9
Library: Added buffer-size attribute for <alloc>
2019-03-17 10:55:15 +01:00
Daniel Marjamäki
a3257349b9
astyle formatting
...
[ci skip]
2019-03-17 10:50:06 +01:00
Daniel Marjamäki
475036c4bc
manual.md: describe library configuration
2019-03-17 10:28:53 +01:00
Daniel Marjamäki
c7155a8e08
Removed '--experimental-fast' flag
2019-03-17 08:19:56 +01:00
Daniel Marjamäki
b0c92c1ac1
CheckNullPointer: Use library instead of hardcoding
2019-03-17 07:37:38 +01:00
Daniel Marjamäki
87fe5c060e
Refactoring of Null Pointer Checker
2019-03-16 21:21:30 +01:00
Daniel Marjamäki
d0c1632b51
Fix CheckBufferOverrun::array_index_12 when compiling with VS
2019-03-16 19:41:13 +01:00
Daniel Marjamäki
ebef16b8a3
Travis: Try to remove temporary fix
2019-03-16 18:29:02 +01:00
Daniel Marjamäki
34a8b2b519
Quick fix for 'make checkcfg'
2019-03-16 18:17:16 +01:00
Daniel Marjamäki
e9d29e826f
Travis: Temporarily comment out failing test
2019-03-16 09:48:32 +01:00
Daniel Marjamäki
fb2198fd6b
Travis: Try to fix test
2019-03-16 09:28:00 +01:00
Daniel Marjamäki
3dc34f1515
Disable all simplified checks
2019-03-16 09:17:50 +01:00
Daniel Marjamäki
0e88a17aca
CheckInternal: Use 'normal' checking
2019-03-16 08:51:33 +01:00
Daniel Marjamäki
f40a80c349
Use 'normal' checking instead of 'simplified'
2019-03-16 07:19:48 +01:00
Daniel Marjamäki
a2a216bbe3
SymbolDatabase: Improved handling of 'normal' non simplified token list
2019-03-15 19:00:42 +01:00
versat
4e051ef865
donate-cpu.py: Improve Python library detection.
...
The official documentation recommends to include the Python C API via
`#include "Python.h"`:
https://docs.python.org/3/c-api/intro.html
And many projects do it exactly this way, that is why the client script
often does not detect the usage of the Python C API.
2019-03-15 16:16:38 +01:00
versat
49f2fd6d4a
donate-cpu.py: Detect and use ruby library.
2019-03-15 15:34:06 +01:00
Daniel Marjamäki
92485245ce
Restore severity for 'autoVariables'
2019-03-15 15:13:11 +01:00
versat
0cb45b1f42
gtk.cfg: Add more macros and some functions used in the macros.
2019-03-15 14:51:45 +01:00
versat
6f7612de03
boost.cfg: Add argument directions; some fixes; rearrange and document.
...
- Remove redundant function configurations for the same function since
it is not (yet) possible to configure overloaded functions. Instead mark
the optional arguments with `default="0"` so the configuration works
with a different number of arguments.
- Add documentation to boost.cfg (links and function declarations).
- Rearranged configurations so functions, defines, ... are together now.
- Add `direction` for function arguments where applicable.
- Add some tests to boost.cpp.
2019-03-15 11:13:08 +01:00
Sebastian
08d41ab8af
Load std.cfg before all other libraries ( #1740 )
...
- CLI: Save the libraries that should be loaded to a list and load them
after the std.cfg has been loaded.
- GUI: Load std.cfg (and windows.cfg / posix.cfg when applicable) before
setting other options and loading the other libraries.
In the project-file-dialog the std.cfg is searched first. If some
other library fails to load is is retried with first loading std.cfg.
- boost.cfg: Enable containers that depend on std containers.
2019-03-15 06:59:37 +01:00
Paul Fultz II
3615eac347
Move useStlAlgorithm to normal checking ( #1741 )
2019-03-15 06:15:56 +01:00
Daniel Marjamäki
a1ade2dd7d
Refactoring: Use range for
2019-03-14 19:57:58 +01:00
Daniel Marjamäki
56c47fc6ed
Refactoring: use continue
2019-03-14 19:53:45 +01:00