From: <bi...@us...> - 2012-07-10 21:47:35
|
Revision: 8029 http://oorexx.svn.sourceforge.net/oorexx/?rev=8029&view=rev Author: bigrixx Date: 2012-07-10 21:47:25 +0000 (Tue, 10 Jul 2012) Log Message: ----------- [ oorexx-Bugs-3542187 ] Stackspace check on 64-bit platform not large enough Modified Paths: -------------- main/trunk/interpreter/concurrency/RexxActivity.cpp main/trunk/interpreter/platform/windows/PlatformDefinitions.h Modified: main/trunk/interpreter/concurrency/RexxActivity.cpp =================================================================== --- main/trunk/interpreter/concurrency/RexxActivity.cpp 2012-07-10 19:36:45 UTC (rev 8028) +++ main/trunk/interpreter/concurrency/RexxActivity.cpp 2012-07-10 21:47:25 UTC (rev 8029) @@ -93,6 +93,10 @@ // save the actitivation level in case there's an error unwind for an unhandled // exception; size_t activityLevel = 0; + // the thread might have terminated for a control stack issue + // so make sure checking is turned back on before trying to run + // anything + this->stackcheck = true; try { @@ -1085,7 +1089,7 @@ restoreActivationLevel(activityLevel); /* we're safe again */ this->requestingString = false; - this->stackcheck = true; /* disable the checking */ + this->stackcheck = true; // reenable the checking } } } @@ -1968,10 +1972,10 @@ /******************************************************************************/ { #ifdef STACKCHECK - size_t temp; /* if checking and there isn't room */ + size_t temp; // if checking and there isn't room if (((char *)&temp - (char *)this->stackBase) < MIN_C_STACK && this->stackcheck == true) { - /* go raise an exception */ + // go raise an exception reportException(Error_Control_stack_full); } #endif Modified: main/trunk/interpreter/platform/windows/PlatformDefinitions.h =================================================================== --- main/trunk/interpreter/platform/windows/PlatformDefinitions.h 2012-07-10 19:36:45 UTC (rev 8028) +++ main/trunk/interpreter/platform/windows/PlatformDefinitions.h 2012-07-10 21:47:25 UTC (rev 8029) @@ -56,7 +56,9 @@ /* REQUIRED: The implemenation must decide on the C_STACK_SIZE defining */ /* constants that are compiler/linker dependent. */ /******************************************************************************/ -#define MIN_C_STACK 1024*32 +// we need a little more space on 64-bit platforms, so add some padding based on +// the size of a pointer +#define MIN_C_STACK 1024*(32 + sizeof(void *)) #define TOTAL_STACK_SIZE 1024*512 #define C_STACK_SIZE 60000 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |