From 33c34d30df0a52683fd1184e2503556eab44fda3 Mon Sep 17 00:00:00 2001 From: tushenmei Date: Tue, 10 Aug 2021 16:23:58 +0800 Subject: [PATCH] bugfix-SIGSTKSZ-not-constant --- bugfix-SIGSTKSZ-not-constant.patch | 16 ++++++++++++++++ cppcheck.spec | 6 +++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 bugfix-SIGSTKSZ-not-constant.patch diff --git a/bugfix-SIGSTKSZ-not-constant.patch b/bugfix-SIGSTKSZ-not-constant.patch new file mode 100644 index 0000000..f953603 --- /dev/null +++ b/bugfix-SIGSTKSZ-not-constant.patch @@ -0,0 +1,16 @@ +diff -Nur cppcheck-1.83/cli/cppcheckexecutor.cpp cppcheck-1.83-new/cli/cppcheckexecutor.cpp +--- cppcheck-1.83/cli/cppcheckexecutor.cpp 2018-04-02 15:02:50.000000000 +0800 ++++ cppcheck-1.83-new/cli/cppcheckexecutor.cpp 2021-08-10 15:29:21.000000000 +0800 +@@ -295,7 +295,12 @@ + #endif + } + ++ ++#ifdef __USE_DYNAMIC_STACK_SIZE ++static const size_t MYSTACKSIZE = 16*1024+32768; // wild guess about a reasonable buffer ++#else + static const size_t MYSTACKSIZE = 16*1024+SIGSTKSZ; // wild guess about a reasonable buffer ++#endif + static char mytstack[MYSTACKSIZE]= {0}; // alternative stack for signal handler + static bool bStackBelowHeap=false; // lame attempt to locate heap vs. stack address space. See CppCheckExecutor::check_wrapper() + diff --git a/cppcheck.spec b/cppcheck.spec index 4571f1f..6ca36dd 100644 --- a/cppcheck.spec +++ b/cppcheck.spec @@ -1,6 +1,6 @@ Name: cppcheck Version: 1.83 -Release: 7 +Release: 8 Summary: Tool for static C/C++ code analysis License: GPLv3+ URL: http://cppcheck.wiki.sourceforge.net/ @@ -10,6 +10,7 @@ Patch0000: cppcheck-1.83-tinyxml.patch Patch0001: cppcheck-1.81-translations.patch Patch0002: cppcheck-1.78-cfgdir.patch Patch0003: cppcheck-1.83-cmake.patch +Patch0004: bugfix-SIGSTKSZ-not-constant.patch BuildRequires: gcc-c++ pcre-devel docbook-style-xsl libxslt cmake desktop-file-utils tinyxml2-devel >= 2.1.0 @@ -62,6 +63,9 @@ cd objdir-%{_target_platform}/bin %{_mandir}/man1/cppcheck.1* %changelog +* Tue Aug 10 2021 Shenmei Tu - 1.83-8 +- bugfix-SIGSTKSZ-not-constant.patch + * Thu Mar 04 2021 maminjie - 1.83-7 - Add requires python3-unversioned-command to resolve compatibility