Description of problem: cppcheck consumers all of the system's memory and is eventually killed by the kernel. Version-Release number of selected component (if applicable): cppcheck-1.88-1.fc30.x86_64 How reproducible: 100% Steps to Reproduce: 1. Create C++ source which requires complex template simplification [1] 2. Run cppcheck on it Actual results: From dmesg: oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/user.slice/user-1000.slice/user,task=cppcheck,pid=1585,uid=1000 Out of memory: Killed process 1585 (cppcheck) total-vm:27857440kB, anon-rss:15142504kB, file-rss:4kB, shmem-rss:0kB oom_reaper: reaped process 1585 (cppcheck), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB Expected results: cppcheck does not consume all of my system's memory, and runs to completion. Additional info: We first started seeing this manifest as test failures a few days ago on CentOS 7, so the EPEL package is affected as well. Since EPEL doesn't have a separate repository for updates, there isn't an older version to fall back to. It appears that a fix has been applied for this upstream, but I'm not completely confident I've found the commit with the proper fix, though applying this[2] patch resolves the issue for me, and I haven't observed any other fallout. Given the potentially destructive nature of consuming all of the system's memory and the release cadence that upstream has taken in the past, I think this bug is worth patching until the next release comes along. [1] https://github.com/ros2/rclcpp/blob/9aacc6d89523e8fc27769f9b7f31ed97ceec54b1/rclcpp/include/rclcpp/subscription_traits.hpp#L76-L92 [2] https://github.com/danmar/cppcheck/pull/1939
FEDORA-EPEL-2019-7492840e06 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-7492840e06
FEDORA-2019-f9f7e46824 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-f9f7e46824
cppcheck-1.88-3.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-f9f7e46824
cppcheck-1.88-3.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-a4be77a649
cppcheck-1.88-3.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-7492840e06
Thanks for taking action on this. It appears that I was mistaken that there were no ill-effects from this patch. Even though cppcheck now exits successfully, I noticed the following message in the logs: [src/ros2/rclcpp/rclcpp/test/test_subscription_traits.cpp:125]: (error) syntax error I believe that the patch[1] which fixes this issue is also applied upstream. My apologies for not testing more thoroughly before making noise. [1] https://github.com/danmar/cppcheck/pull/1943
cppcheck-1.88-3.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.
cppcheck-1.88-3.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.
cppcheck-1.88-3.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.