Bug 382074

Summary: Infinite symlink loop -> infinite parsing loop
Product: [Applications] kdevelop Reporter: Matthew Woehlke <mwoehlke.floss>
Component: Build tools: CMakeAssignee: kdevelop-bugs-null
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 5.1.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 5.1.2
Sentry Crash Report:

Description Matthew Woehlke 2017-07-06 19:26:28 UTC
When trying to open a project that contains an infinite symlink loop in the build tree, KDevelop also gets stuck in an infinite loop (in importTestSuites) and never finishes opening the project.

This function needs either a depth limit or a mechanism to detect symlink cycles.

To reproduce:
- Configure CMake ()
- Try to open the configured CMake project in KDevelop
Comment 1 Kevin Funk 2017-07-06 21:04:53 UTC
Git commit 8675307a266704da08e0344f836dac1d7e9e1396 by Kevin Funk.
Committed on 06/07/2017 at 21:04.
Pushed by kfunk into branch '5.1'.

cmake: Use 'subdirs' function in importTestSuites

Reviewers: apol

Reviewed By: apol

Subscribers: kdevelop-devel

Differential Revision: https://phabricator.kde.org/D6538
FIXED-IN: 5.1.2

M  +34   -19   projectmanagers/cmake/cmakeimportjsonjob.cpp

https://commits.kde.org/kdevelop/8675307a266704da08e0344f836dac1d7e9e1396
Comment 2 Kevin Funk 2017-07-06 21:05:32 UTC
Please check whether that fixes the issue for you. 

Best to compile KDevelop from source for that: https://community.kde.org/KDevelop/HowToCompile_v5
Comment 3 Matthew Woehlke 2017-07-07 19:30:08 UTC
(Ugh, use a build tool that mucks with my FS in unknown ways? I'll stick to 'git clone', thanks!)

Wow, that was a quick fix! And a much better fix than my (being unfamiliar with the code in question) naïve offhand suggestion.

AFAICT it is working \o/. Thanks!