Bug 1472466 - cppcheck segfault on qml file
cppcheck segfault on qml file
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: cppcheck (Show other bugs)
26
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Susi Lehtola
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-18 15:59 EDT by ced
Modified: 2017-09-11 04:56 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-09-11 04:56:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description ced 2017-07-18 15:59:10 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)

How reproducible:


Steps to Reproduce:
1. Create a "fake" qml file looking like this

```
MyElement {
    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
```


Actual results:

Cppcheck crash

```
Checking /tmp/project/sample.qml ...
Segmentation fault (core dumped)
```

Expected results:

cppcheck returns with no error

Additional info:

Fedora 26 provides the last released version 1.79
Building from source master do not trigger the bug
Comment 1 ced 2017-07-18 16:21:59 EDT
after some investigation, this patch should fix the issue:

https://github.com/danmar/cppcheck/commit/956b5812e7c49a7d221f99e12dcb13deb5d6ffab

It can be cherry-picked on 1.79 without conflict
Comment 2 Mamoru TASAKA 2017-09-11 01:06:57 EDT
F-26 now has cppcheck-1.80-1.fc26. Would you confirm if this bug is fixed?
Comment 3 ced 2017-09-11 04:29:05 EDT
I confirm the bug is fixed.
You can close

Thx!
Comment 4 Mamoru TASAKA 2017-09-11 04:56:11 EDT
Thank you for confirming.

Note You need to log in before you can comment on or make changes to this bug.