Fix crash on Windows with -j option (#4229)
* Fix crash on Windows with -j option
* Disable CI-cygwin workflow
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Try to fix Cygwin build
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Update CI-cygwin.yml
* Cygwin uses THREADING_MODEL_FORK
* Restore workflows
* Remove comment
* Fix dmake
* Fix #11179 FP invalidFunctionArgStr
* Revert "Fix #11179 FP invalidFunctionArgStr"
This reverts commit dd5d3e67c6
.
This commit is contained in:
parent
b387ae80f1
commit
21d992cc00
|
@ -16,6 +16,10 @@ jobs:
|
|||
matrix:
|
||||
os: [windows-2019]
|
||||
arch: [x64, x86]
|
||||
include:
|
||||
- platform: 'x86_64'
|
||||
packages: |
|
||||
gcc-g++
|
||||
fail-fast: false
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
@ -24,26 +28,27 @@ jobs:
|
|||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Cygwin
|
||||
uses: egor-tensin/setup-cygwin@v3
|
||||
uses: cygwin/cygwin-install-action@master
|
||||
with:
|
||||
platform: ${{ matrix.arch }}
|
||||
packages: ${{ matrix.packages }}
|
||||
|
||||
- name: Build cppcheck
|
||||
run: |
|
||||
C:\tools\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make -j2
|
||||
C:\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make -j2
|
||||
|
||||
- name: Build test
|
||||
run: |
|
||||
C:\tools\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make -j2 testrunner
|
||||
C:\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make -j2 testrunner
|
||||
|
||||
- name: Run test
|
||||
run: |
|
||||
C:\tools\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make -j2 check
|
||||
C:\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make -j2 check
|
||||
|
||||
- name: Extra test for misra
|
||||
run: |
|
||||
C:\tools\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE%\addons\test
|
||||
..\..\cppcheck --dump -DDUMMY --suppress=uninitvar --inline-suppr misra\misra-test.c --std=c89 --platform=unix64 && python3 ..\misra.py -verify misra\misra-test.c.dump
|
||||
C:\tools\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE%
|
||||
.\cppcheck --addon=misra --inline-suppr --enable=information --error-exitcode=1 addons\test\misra\misra-ctu-*-test.c
|
||||
cd %GITHUB_WORKSPACE%\addons\test
|
||||
..\..\cppcheck.exe --dump -DDUMMY --suppress=uninitvar --inline-suppr misra\misra-test.c --std=c89 --platform=unix64
|
||||
python3 ..\misra.py -verify misra\misra-test.c.dump
|
||||
..\..\cppcheck.exe --addon=misra --inline-suppr --enable=information --error-exitcode=1 misra\misra-ctu-1-test.c misra\misra-ctu-2-test.c
|
||||
|
||||
|
|
2
Makefile
2
Makefile
|
@ -102,7 +102,7 @@ ifndef CXXFLAGS
|
|||
endif
|
||||
|
||||
ifeq (g++, $(findstring g++,$(CXX)))
|
||||
override CXXFLAGS += -std=c++0x
|
||||
override CXXFLAGS += -std=gnu++0x
|
||||
else ifeq (clang++, $(findstring clang++,$(CXX)))
|
||||
override CXXFLAGS += -std=c++0x
|
||||
else ifeq ($(CXX), c++)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "processexecutor.h"
|
||||
|
||||
#if !defined(WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
|
||||
#if !defined(WIN32) && !defined(__MINGW32__)
|
||||
|
||||
#include "color.h"
|
||||
#include "config.h"
|
||||
|
|
|
@ -110,7 +110,7 @@ static const std::string emptyString;
|
|||
#elif defined(USE_THREADS)
|
||||
#define THREADING_MODEL_THREAD
|
||||
#define STDCALL
|
||||
#elif ((defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__) && !defined(__CYGWIN__)) || defined(__CPPCHECK__)
|
||||
#elif ((defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__)) || defined(__CPPCHECK__)
|
||||
#define THREADING_MODEL_FORK
|
||||
#define STDCALL
|
||||
#else
|
||||
|
|
|
@ -1367,8 +1367,8 @@ ValueFlow::Value evaluateLibraryFunction(const std::unordered_map<nonneg int, Va
|
|||
const std::string& returnValue,
|
||||
const Settings* settings)
|
||||
{
|
||||
static std::unordered_map<std::string,
|
||||
std::function<ValueFlow::Value(const std::unordered_map<nonneg int, ValueFlow::Value>& arg)>>
|
||||
thread_local static std::unordered_map<std::string,
|
||||
std::function<ValueFlow::Value(const std::unordered_map<nonneg int, ValueFlow::Value>& arg)>>
|
||||
functions = {};
|
||||
if (functions.count(returnValue) == 0) {
|
||||
|
||||
|
|
|
@ -374,7 +374,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
fout << "ifeq (g++, $(findstring g++,$(CXX)))\n"
|
||||
<< " override CXXFLAGS += -std=c++0x\n"
|
||||
<< " override CXXFLAGS += -std=gnu++0x\n"
|
||||
<< "else ifeq (clang++, $(findstring clang++,$(CXX)))\n"
|
||||
<< " override CXXFLAGS += -std=c++0x\n"
|
||||
<< "else ifeq ($(CXX), c++)\n"
|
||||
|
|
Loading…
Reference in New Issue