View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013822CMakeCMakepublic2012-12-29 20:172016-06-10 14:31
ReporterMatt Arsenault 
Assigned ToKitware Robot 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSMac OS XOS Version10.8.2
Product VersionCMake 2.8.10.2 
Target VersionFixed in Version 
Summary0013822: Crash on infinite recursion in CMake language
DescriptionWhen running the attached test case, it crashes.

-- Detecting CXX compiler ABI info - done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00007fff5bc00bf8
0x0000000100096604 in cmCommandArgument_yyparse ()
(gdb) bt
#0 0x0000000100096604 in cmCommandArgument_yyparse ()
#1 0x0000000100098804 in cmCommandArgumentParserHelper::ParseString ()
0000002 0x0000000100150c55 in cmMakefile::ExpandVariablesInString ()
0000003 0x0000000100151ea0 in cmMakefile::ExpandArguments ()
0000004 0x0000000100065551 in cmCommand::InvokeInitialPass ()
0000005 0x0000000100146caa in cmMakefile::ExecuteCommand ()
....
Steps To ReproduceRun the attached test case.

cd cmake_bug; cmake .
Additional InformationInstalled from macports
TagsNo tags attached.
Attached Fileszip file icon cmake_bug.zip [^] (297,619 bytes) 2012-12-29 20:17

 Relationships

  Notes
(0031957)
Brad King (manager)
2013-01-02 10:40

The example performs infinite recursion and exhausts the stack.

The libfind_package macro does find_package with the original arguments which then circles around to the original find module again.

CMake should track the call stack depth and limit it so that this case fails with an error instead of crashing.
(0042188)
Kitware Robot (administrator)
2016-06-10 14:28

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2012-12-29 20:17 Matt Arsenault New Issue
2012-12-29 20:17 Matt Arsenault File Added: cmake_bug.zip
2013-01-02 10:40 Brad King Note Added: 0031957
2013-01-02 10:40 Brad King Status new => backlog
2013-01-02 10:40 Brad King Product Version CMake 2.8.9 => CMake 2.8.10.2
2013-01-02 10:40 Brad King Summary Crash when using LibFindMacros => Crash on infinite recursion in CMake language
2016-06-10 14:28 Kitware Robot Note Added: 0042188
2016-06-10 14:28 Kitware Robot Status backlog => resolved
2016-06-10 14:28 Kitware Robot Resolution open => moved
2016-06-10 14:28 Kitware Robot Assigned To => Kitware Robot
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team