New topic: 

Stack overflow on Linux, not on Windows for same source code

<http://forums.realsoftware.com/viewtopic.php?t=47890>

         Page 1 of 1
   [ 3 posts ]                 Previous topic | Next topic          Author  
Message        Shahid          Post subject: Stack overflow on Linux, not on 
Windows for same source codePosted: Wed May 15, 2013 6:56 pm                    
     
Joined: Wed May 15, 2013 6:07 pm
Posts: 2                Hello,
   A heavily recursive application (an ASN.1 interpreter) was migrated from VB6 
to RealBasic for the only purpose of providing Linux users the access to this 
application. And its RealBasic version works fine on Windows. However the Linux 
version of the same causes stack overflow for the same input data when the call 
stack is 52 levels deep. By placing breakpoints in VB6 and RB Windows version 
at the same point in source code where Linux version had shown stack overflow, 
it was noted there is no real problem in the code because both VB6 and RB 
Windows version of the application also show that call stack is 52 levels deep 
and these versions do not have stack overflow problem.

Real Software support has suggested to use threads and set the stack size as 
required. 

Is there any solution possible to this problem please without modifying the 
source code?

Thanks,

Shahid.   
                             Top                npalardy          Post subject: 
Re: Stack overflow on Linux, not on Windows for same source Posted: Wed May 15, 
2013 8:11 pm                       Real Software Engineer          
Joined: Sat Dec 24, 2005 8:18 pm
Posts: 7835
Location: Canada, Alberta, Near Red Deer                Hard to say without 
actually seeing the code.
Often this is "the stack is too deep and so has consumed all available stack 
space in the process space".
But not always.
It can just be that each frame is enormous and you've run out of usable stack 
space.
But that's hard to know without seeing the code as diagnosing this remotely in 
the forums is really hard.      
_________________
Norman Palardy (Real Software)  
                             Top                timhare          Post subject: 
Re: Stack overflow on Linux, not on Windows for same source Posted: Wed May 15, 
2013 11:24 pm                         
Joined: Fri Jan 06, 2006 3:21 pm
Posts: 12322
Location: Portland, OR  USA                Doesn't Windows use a much larger 
stack space by default?  Put your recursive code in a thread and set the stack 
size sufficiently large.   
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 3 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to