View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0009747CMakeCMakepublic2009-10-20 15:252011-06-06 18:25
ReporterKevin Burge 
Assigned ToBill Hoffman 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake-2-8 
Target VersionFixed in VersionCMake-2-8 
Summary0009747: $ENV{} unhandled win32 exception on Windows
Descriptiontest.cmake:
set (ENV{TEST} "test:$ENV{}")

cmake -P test.cmake

causes the exception.
TagsNo tags attached.
Attached Filespatch file icon 9747.patch [^] (901 bytes) 2009-10-22 00:05 [Show Content]
patch file icon 9747_2.patch [^] (1,050 bytes) 2009-10-22 00:09 [Show Content]

 Relationships

  Notes
(0018161)
Kevin Burge (reporter)
2009-10-22 00:07

I don't know if the patch is correct, but it does fix the test case. Is ${}, $ENV{}, or $CACHE{} ever actually valid without a variable name?
(0018162)
Kevin Burge (reporter)
2009-10-22 00:10

Just realized that the my patch was checking for var and using key before key was checked. Second patch fixes, and adds an optimization.
(0018177)
Bill Hoffman (manager)
2009-10-22 09:43

I already checked this in:


Log Message:
Fix seg fault for empty ENV{} call bug 0009747


Index: cmCommandArgumentParserHelper.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCommandArgumentParserHelper.cxx,v
retrieving revision 1.24
retrieving revision 1.25
diff -C 2 -d -r1.24 -r1.25
*** cmCommandArgumentParserHelper.cxx 28 Sep 2009 15:41:57 -0000 1.24
--- cmCommandArgumentParserHelper.cxx 21 Oct 2009 13:04:50 -0000 1.25
***************
*** 66,70 ****
      {
      return this->ExpandVariable(var);
! }
    if ( strcmp(key, "ENV") == 0 )
      {
--- 66,74 ----
      {
      return this->ExpandVariable(var);
! }
! if(!var)
! {
! return this->EmptyVariable;
! }
    if ( strcmp(key, "ENV") == 0 )
      {
(0026687)
David Cole (manager)
2011-06-06 18:25

Closing resolved issues that have not been updated in more than 3 months.

 Issue History
Date Modified Username Field Change
2009-10-20 15:25 Kevin Burge New Issue
2009-10-20 15:34 Bill Hoffman Status new => assigned
2009-10-20 15:34 Bill Hoffman Assigned To => Bill Hoffman
2009-10-22 00:05 Kevin Burge File Added: 9747.patch
2009-10-22 00:07 Kevin Burge Note Added: 0018161
2009-10-22 00:09 Kevin Burge File Added: 9747_2.patch
2009-10-22 00:10 Kevin Burge Note Added: 0018162
2009-10-22 09:43 Bill Hoffman Note Added: 0018177
2011-02-03 18:04 David Cole Status assigned => resolved
2011-02-03 18:04 David Cole Fixed in Version => CMake-2-8
2011-02-03 18:04 David Cole Resolution open => fixed
2011-06-06 18:25 David Cole Status resolved => closed
2011-06-06 18:25 David Cole Note Added: 0026687


Copyright © 2000 - 2018 MantisBT Team