Red Hat Bugzilla – Bug 1472466
cppcheck segfault on qml file
Last modified: 2017-09-11 04:56:11 EDT
Description of problem:
Cppcheck crash with a segfault when analysing a Qt (cpp) project with a specific Qml file.
(Note: qml is the UI description language used by the Qt framework)
Steps to Reproduce:
1. Create a "fake" qml file looking like this
title: qsTr("Hello World")
button.onClicked: title = "foo";
Save it in "/tmp/project/sample.qml"
The important point in this file is the "onClicked" element
2. Run cppcheck with the following options:
cppcheck --enable=all --library=qt /tmp/project
Checking /tmp/project/sample.qml ...
Segmentation fault (core dumped)
cppcheck returns with no error
Fedora 26 provides the last released version 1.79
Building from source master do not trigger the bug
after some investigation, this patch should fix the issue:
It can be cherry-picked on 1.79 without conflict
F-26 now has cppcheck-1.80-1.fc26. Would you confirm if this bug is fixed?
I confirm the bug is fixed.
You can close
Thank you for confirming.