Bug 352618 - Another "use function returning reference to temporary" problem lead to crash
Summary: Another "use function returning reference to temporary" problem lead to crash
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: 4.7.1
Platform: Debian unstable Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-12 15:02 UTC by Zhang Jingqiang
Modified: 2015-10-04 11:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
the patch to fix the problem (1.04 KB, patch)
2015-09-12 15:12 UTC, Zhang Jingqiang
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zhang Jingqiang 2015-09-12 15:02:23 UTC
languages/cpp/cppduchain/environmentmanager.cpp line 235:

for( ReferenceCountedStringSet::Iterator it(conflicts.iterator()); it; ++it ) {
-    if (!environmentMacroNames.contains(it.ref())) {
+    if (!environmentMacroNames.contains( *it )) {
       continue;
     }

All ReferenceCountedStringSet::Iterator ones need to be fixed.

Reproducible: Always
Comment 1 Zhang Jingqiang 2015-09-12 15:12:41 UTC
Created attachment 94519 [details]
the patch to fix the problem
Comment 2 Milian Wolff 2015-10-04 11:12:56 UTC
Git commit b211a552ac8d6b0094ac81234422f9cae7e79ddb by Milian Wolff, on behalf of Jingqiang Zhang.
Committed on 04/10/2015 at 11:12.
Pushed by mwolff into branch '4.7'.

Fix one more use of function return refer to temp variable.
REVIEW: 125404

M  +1    -1    languages/cpp/cppduchain/environmentmanager.cpp

http://commits.kde.org/kdevelop/b211a552ac8d6b0094ac81234422f9cae7e79ddb