Thanks for reporting this. I can confirm this issue with the latest version on Linux. It seems that problem is related with Cppcheck internals, not with MISRA addon. I got the following error when running this command using Cppcheck built from sources:
I ran into some issues with the MISRA addon: after generating the dump file, running the MISRA addon terminates on a fault (error trace below).
This seems similar to https://sourceforge.net/p/cppcheck/discussion/general/thread/f7e5153341/ and adding a if statement at the faulty line in the cppcheckdata Python module seems to fix the problem.
I am attaching a small C++14 header file (test.h) that reproduces the issue using CppCheck version 2.1 (macOS 10.15.5, installed via homebrew).
Error trace:
Hello,
Thanks for reporting this. I can confirm this issue with the latest version on Linux. It seems that problem is related with Cppcheck internals, not with MISRA addon. I got the following error when running this command using Cppcheck built from sources:
So I suppose that in your case Cppcheck can't generate correct dump file, what caused crash in XML parser in cppcheckdata.py.
Yes sorry for the misleading title of the topic (seems I cannot update it).
I agree that this seems to point to an issue in the dump generation.
I initially thought the
typename = std::enable_if_t...
bits was causing the issue but even without it the dump file does not seem proper.Not sure if this will be useful to further diagnose but removing the
using type = T
line in the test file seems to fix the issue.Last edit: David Ledger 2020-11-18
Hi, David,
Could you attach a minimal example demonstrating this issue, please?