cppcheck/lib
Michael Drake d651b6baf1
dump: Fix concurrency problem with dump files (#4757)
* dump: Fix concurrency problem with dump files

This adds the process ID for the cppcheck process to the filenames
of the .dump and .ctu-info files that the process generates.

So
  lib/cppcheck.cpp.dump
becomes
  lib/cppcheck.cpp.<PID>.dump

For example:
  lib/cppcheck.cpp.2637871.dump

The reason for this change is that if there is a buildsystem which
supports concurrency, multiple instances of cppcheck may be run for
the same file.  For example, if the same file is compiled in multiple
build variants, or for multiple targets.

If running the MISRA plugin over such a project with concurrency
enabled in the buildsystem, the plugin ends up crashing as multiple
jobs attempt to create/trample/delete the same files while other
jobs are using them.

For more information see:
    https://sourceforge.net/p/cppcheck/discussion/general/thread/02c757b4af/

* dump: Include pid in filename if dump not explicit

Only change the dump and ctu-info filenames to include the PID if
they are being generated due to an addon.

This means that existing scripts that use `--dump` will still work
if they depend on the previous naming behaviour. The more robust
filenames containing the pid will be used when the dump files are
used as an internal implementation detail for passing data to addons.

However this means that anything that does explicitly use `--dump`
will be susceptible to concurrency problems.

* test: Update addon dump file test to account for pid

This test causes a dump file to be created by enabling the misra
addon. Since the dump files now include the cppcheck process pid
this test had to be updated to account for the change.
2023-02-13 20:54:21 +01:00
..
CMakeLists.txt added CMake option `BUILD_CORE_DLL` to build lib as `cppcheck-core.dll` with Visual Studio (#4733) 2023-01-26 22:13:07 +01:00
analyzer.h Update copyright year 2023-01-28 10:16:34 +01:00
analyzerinfo.cpp Update copyright year 2023-01-28 10:16:34 +01:00
analyzerinfo.h Update copyright year 2023-01-28 10:16:34 +01:00
astutils.cpp Token: do not return non-`const` pointer from `const` methods - part 1 (#4761) 2023-02-08 21:07:16 +01:00
astutils.h Update copyright year 2023-01-28 10:16:34 +01:00
calculate.h
check.cpp Check: disallow more than one instance per check (#4749) 2023-01-29 17:23:03 +01:00
check.h Update copyright year 2023-01-28 10:16:34 +01:00
check64bit.cpp
check64bit.h
checkassert.cpp Update copyright year 2023-01-28 10:16:34 +01:00
checkassert.h
checkautovariables.cpp ValueFlow: some interface and namespace cleanups (#4746) 2023-01-28 10:20:47 +01:00
checkautovariables.h Update copyright year 2023-01-28 10:16:34 +01:00
checkbool.cpp Update copyright year 2023-01-28 10:16:34 +01:00
checkbool.h Update copyright year 2023-01-28 10:16:34 +01:00
checkboost.cpp
checkboost.h
checkbufferoverrun.cpp ValueFlow: some interface and namespace cleanups (#4746) 2023-01-28 10:20:47 +01:00
checkbufferoverrun.h Update copyright year 2023-01-28 10:16:34 +01:00
checkclass.cpp Set functions for calls through iterators (#4763) 2023-02-07 21:57:59 +01:00
checkclass.h Update copyright year 2023-01-28 10:16:34 +01:00
checkcondition.cpp Update copyright year 2023-01-28 10:16:34 +01:00
checkcondition.h Update copyright year 2023-01-28 10:16:34 +01:00
checkexceptionsafety.cpp CheckExceptionSafety: moved `CWE` objects into source file (#4759) 2023-02-06 22:01:31 +01:00
checkexceptionsafety.h CheckExceptionSafety: moved `CWE` objects into source file (#4759) 2023-02-06 22:01:31 +01:00
checkfunctions.cpp Fix FP ignoredReturnValue (#4783) 2023-02-11 10:46:04 +01:00
checkfunctions.h Update copyright year 2023-01-28 10:16:34 +01:00
checkinternal.cpp Update copyright year 2023-01-28 10:16:34 +01:00
checkinternal.h Update copyright year 2023-01-28 10:16:34 +01:00
checkio.cpp Update copyright year 2023-01-28 10:16:34 +01:00
checkio.h Update copyright year 2023-01-28 10:16:34 +01:00
checkleakautovar.cpp Update copyright year 2023-01-28 10:16:34 +01:00
checkleakautovar.h Update copyright year 2023-01-28 10:16:34 +01:00
checkmemoryleak.cpp Update copyright year 2023-01-28 10:16:34 +01:00
checkmemoryleak.h Update copyright year 2023-01-28 10:16:34 +01:00
checknullpointer.cpp Update copyright year 2023-01-28 10:16:34 +01:00
checknullpointer.h Update copyright year 2023-01-28 10:16:34 +01:00
checkother.cpp ValueFlow: some interface and namespace cleanups (#4746) 2023-01-28 10:20:47 +01:00
checkother.h Update copyright year 2023-01-28 10:16:34 +01:00
checkpostfixoperator.cpp
checkpostfixoperator.h
checksizeof.cpp Update copyright year 2023-01-28 10:16:34 +01:00
checksizeof.h Update copyright year 2023-01-28 10:16:34 +01:00
checkstl.cpp Set functions for calls through iterators (#4763) 2023-02-07 21:57:59 +01:00
checkstl.h Update copyright year 2023-01-28 10:16:34 +01:00
checkstring.cpp
checkstring.h Update copyright year 2023-01-28 10:16:34 +01:00
checktype.cpp greatly improved error handling in Cppcheck project file parsing / some cleanups (#4752) 2023-02-08 20:30:43 +01:00
checktype.h Update copyright year 2023-01-28 10:16:34 +01:00
checkuninitvar.cpp Update copyright year 2023-01-28 10:16:34 +01:00
checkuninitvar.h Update copyright year 2023-01-28 10:16:34 +01:00
checkunusedfunctions.cpp Update copyright year 2023-01-28 10:16:34 +01:00
checkunusedfunctions.h Update copyright year 2023-01-28 10:16:34 +01:00
checkunusedvar.cpp Token: do not return non-`const` pointer from `const` methods - part 1 (#4761) 2023-02-08 21:07:16 +01:00
checkunusedvar.h Update copyright year 2023-01-28 10:16:34 +01:00
checkvaarg.cpp Update copyright year 2023-01-28 10:16:34 +01:00
checkvaarg.h
clangimport.cpp Token: do not return non-`const` pointer from `const` methods - part 1 (#4761) 2023-02-08 21:07:16 +01:00
clangimport.h LCppC backports: Refactorizations/Optimizations (#4204) 2022-08-21 17:21:02 +02:00
color.cpp
color.h
config.h Update copyright year 2023-01-28 10:16:34 +01:00
cppcheck.cpp dump: Fix concurrency problem with dump files (#4757) 2023-02-13 20:54:21 +01:00
cppcheck.h Update copyright year 2023-01-28 10:16:34 +01:00
cppcheck.natvis added .gitattributes and normalized files (#4668) 2022-12-30 21:33:45 +01:00
cppcheck.vcxproj extracted `ValueFlow::Value` to `vfvalue.{cpp|h}` (#4642) 2023-01-26 22:23:22 +01:00
cppcheck.vcxproj.filters extracted `ValueFlow::Value` to `vfvalue.{cpp|h}` (#4642) 2023-01-26 22:23:22 +01:00
ctu.cpp Update copyright year 2023-01-28 10:16:34 +01:00
ctu.h Update copyright year 2023-01-28 10:16:34 +01:00
errorlogger.cpp fixed and enabled `performance-faster-string-find` clang-tidy warning (#4769) 2023-02-08 21:01:51 +01:00
errorlogger.h Update copyright year 2023-01-28 10:16:34 +01:00
errortypes.cpp
errortypes.h Update copyright year 2023-01-28 10:16:34 +01:00
forwardanalyzer.cpp Update copyright year 2023-01-28 10:16:34 +01:00
forwardanalyzer.h
fwdanalysis.cpp fixed and enabled `performance-faster-string-find` clang-tidy warning (#4769) 2023-02-08 21:01:51 +01:00
fwdanalysis.h Update copyright year 2023-01-28 10:16:34 +01:00
importproject.cpp fixed and enabled `performance-faster-string-find` clang-tidy warning (#4769) 2023-02-08 21:01:51 +01:00
importproject.h greatly improved error handling in Cppcheck project file parsing / some cleanups (#4752) 2023-02-08 20:30:43 +01:00
infer.cpp Update copyright year 2023-01-28 10:16:34 +01:00
infer.h Update copyright year 2023-01-28 10:16:34 +01:00
lib.pri extracted `ValueFlow::Value` to `vfvalue.{cpp|h}` (#4642) 2023-01-26 22:23:22 +01:00
library.cpp Update copyright year 2023-01-28 10:16:34 +01:00
library.h Update copyright year 2023-01-28 10:16:34 +01:00
matchcompiler.h
mathlib.cpp Update copyright year 2023-01-28 10:16:34 +01:00
mathlib.h mathlib.h: replaced slow `std::ostringstream` with `std::to_string()` in `MathLib::toString()` (#4382) 2022-08-19 20:44:24 +02:00
path.cpp Update copyright year 2023-01-28 10:16:34 +01:00
path.h Update copyright year 2023-01-28 10:16:34 +01:00
pathanalysis.cpp Update copyright year 2023-01-28 10:16:34 +01:00
pathanalysis.h
pathmatch.cpp Update copyright year 2023-01-28 10:16:34 +01:00
pathmatch.h
pcrerules.pri
platform.cpp greatly improved error handling in Cppcheck project file parsing / some cleanups (#4752) 2023-02-08 20:30:43 +01:00
platform.h improved setting of platform in tests / also improved platform tests (#4787) 2023-02-11 10:44:56 +01:00
precompiled.h updated precompiled headers based on `ClangBuildAnalyzer` (#4775) 2023-02-08 08:19:21 +01:00
preprocessor.cpp fixed and enabled `performance-faster-string-find` clang-tidy warning (#4769) 2023-02-08 21:01:51 +01:00
preprocessor.h cleaned up includes based on include-what-you-use (#4358) 2022-08-14 12:44:19 +02:00
programmemory.cpp ValueFlow: some interface and namespace cleanups (#4746) 2023-01-28 10:20:47 +01:00
programmemory.h Update copyright year 2023-01-28 10:16:34 +01:00
reverseanalyzer.cpp Update copyright year 2023-01-28 10:16:34 +01:00
reverseanalyzer.h
settings.cpp improved testing of missing includes / made it possible to clear the include cache in simplecpp (#4704) 2023-02-07 22:02:12 +01:00
settings.h improved testing of missing includes / made it possible to clear the include cache in simplecpp (#4704) 2023-02-07 22:02:12 +01:00
smallvector.h Update copyright year 2023-01-28 10:16:34 +01:00
sourcelocation.h Update copyright year 2023-01-28 10:16:34 +01:00
standards.h
summaries.cpp fixed and enabled `performance-faster-string-find` clang-tidy warning (#4769) 2023-02-08 21:01:51 +01:00
summaries.h
suppressions.cpp fixed and enabled `performance-faster-string-find` clang-tidy warning (#4769) 2023-02-08 21:01:51 +01:00
suppressions.h Update copyright year 2023-01-28 10:16:34 +01:00
symboldatabase.cpp fixed and enabled `performance-faster-string-find` clang-tidy warning (#4769) 2023-02-08 21:01:51 +01:00
symboldatabase.h Update copyright year 2023-01-28 10:16:34 +01:00
templatesimplifier.cpp Token: do not return non-`const` pointer from `const` methods - part 1 (#4761) 2023-02-08 21:07:16 +01:00
templatesimplifier.h Update Copyrights 2022-08-28 14:22:12 +02:00
timer.cpp Update copyright year 2023-01-28 10:16:34 +01:00
timer.h fixed #11249 (potential hang with -j and --showtime= when using threads) - synchronized access to `TimerResults::mResults` / added TSAN to CI (#4355) 2022-08-23 20:30:45 +02:00
token.cpp Token: do not return non-`const` pointer from `const` methods - part 1 (#4761) 2023-02-08 21:07:16 +01:00
token.h Token: do not return non-`const` pointer from `const` methods - part 1 (#4761) 2023-02-08 21:07:16 +01:00
tokenize.cpp Token: do not return non-`const` pointer from `const` methods - part 1 (#4761) 2023-02-08 21:07:16 +01:00
tokenize.h Update copyright year 2023-01-28 10:16:34 +01:00
tokenlist.cpp Token: do not return non-`const` pointer from `const` methods - part 1 (#4761) 2023-02-08 21:07:16 +01:00
tokenlist.h Update copyright year 2023-01-28 10:16:34 +01:00
tokenrange.h Update copyright year 2023-01-28 10:16:34 +01:00
utils.cpp Update copyright year 2023-01-28 10:16:34 +01:00
utils.h Update copyright year 2023-01-28 10:16:34 +01:00
valueflow.cpp Fix 11548: FP knownConditionTrueFalse with empty() == false (#4788) 2023-02-11 10:42:13 +01:00
valueflow.h ValueFlow: some interface and namespace cleanups (#4746) 2023-01-28 10:20:47 +01:00
valueptr.h Update copyright year 2023-01-28 10:16:34 +01:00
version.h bumped version to 2.11 (#4751) 2023-01-29 15:18:22 +01:00
version.rc added .gitattributes and normalized files (#4668) 2022-12-30 21:33:45 +01:00
vfvalue.cpp Update copyright year 2023-01-28 10:16:34 +01:00
vfvalue.h Update copyright year 2023-01-28 10:16:34 +01:00