amiga.org
     
iconAll times are GMT -6. The time now is 11:50 AM. | Welcome to Forum, please register to access all of our features.

» Amiga.org » Operating System Specific Discussions » Amiga OS » Amiga OS -- Development » Beware!! stack size and compiler errors (something I found with VBCC...)

Amiga OS -- Development This particular forum deals with issues regarding development for all versions of AmigaOS.

Reply
 
Thread Tools Display Modes
Old 04-18-2005, 12:48 PM   #1
Jose
Kindred of Babble-on
Points: 21,917, Level: 92 Points: 21,917, Level: 92 Points: 21,917, Level: 92
Activity: 10% Activity: 10% Activity: 10%
 
Join Date: Feb 2002
Posts: 2,786
Default Beware!! stack size and compiler errors (something I found with VBCC...)

Been fiddling with my vanilla A1200 this weekend and found that a low stack size caused an identifier expected error in VBCC. I already had the stack higher than default but it wasn't enouph. The error disappeared when I raised the stack even more!!! I know behaviour is a bit unpredictable with stack overflow but I was hoping for a crash or something else not that error. Well actually it did crash once in a while.
__________________
\"We made Amiga, they {bleep}ed it up\"
Jose is offline   Reply With Quote
Old 04-18-2005, 02:04 PM   #2
Dietmar
Technoid
Points: 6,534, Level: 52 Points: 6,534, Level: 52 Points: 6,534, Level: 52
Activity: 6% Activity: 6% Activity: 6%
 
Join Date: Nov 2002
Posts: 220
Default Re: Beware!! stack size and compiler errors (something I found with VBCC...)

So what amount of stack did you use?
Dietmar is offline   Reply With Quote
Old 04-18-2005, 02:22 PM   #3
Thomas
Kindred of Babble-on
Points: 14,028, Level: 76 Points: 14,028, Level: 76 Points: 14,028, Level: 76
Activity: 15% Activity: 15% Activity: 15%
 
Thomas's Avatar
 
Join Date: Jun 2002
Posts: 2,936
Default Re: Beware!! stack size and compiler errors (something I found with VBCC...)

Quote:
Jose wrote:
I already had the stack higher than default but it wasn't enouph. The error disappeared when I raised the stack even more!!!

Sounds like you are a bit too cautious.

I've installed StackAttack with a minimum stack size of 40,000 for all programs. For development I usually use 100,000 bytes or more.

Be assured that VBCC needs much fewer stack than GCC for example.

Bye,
Thomas
__________________
Email: thomas-rapp@web.de
Home: thomas-rapp.homepage.t-online.de/
Thomas is offline   Reply With Quote
Old 04-18-2005, 02:24 PM   #4
Jose
Kindred of Babble-on
Points: 21,917, Level: 92 Points: 21,917, Level: 92 Points: 21,917, Level: 92
Activity: 10% Activity: 10% Activity: 10%
 
Join Date: Feb 2002
Posts: 2,786
Default Re: Beware!! stack size and compiler errors (something I found with VBCC...)

@Dietmar

Mostly 10000 [edit]bytes. It was recommended on the VBCC docs for not very big projects (latest VBCC version recommends 40KB, but I was using a previous version). I got that error with a single function of around 250 lines I tried to compile separetely. Needless to say the whole program (around 50KB source) would never compile with that stack specially with 2MB chip ram only
__________________
\"We made Amiga, they {bleep}ed it up\"
Jose is offline   Reply With Quote
Old 04-18-2005, 02:29 PM   #5
Jose
Kindred of Babble-on
Points: 21,917, Level: 92 Points: 21,917, Level: 92 Points: 21,917, Level: 92
Activity: 10% Activity: 10% Activity: 10%
 
Join Date: Feb 2002
Posts: 2,786
Default Re: Beware!! stack size and compiler errors (something I found with VBCC...)

@Thomas

"Sounds like you are a bit too cautious."

I had to, I was getting out of memory, so started booting without startup sequence, running a script to make the VBCC assigns and then using the commnad line to compile, to have more spare chip ram. It worked :-)
__________________
\"We made Amiga, they {bleep}ed it up\"
Jose is offline   Reply With Quote
Reply

Bookmarks

Tags
found , vbcc , compiler , errors , size , stack , beware

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Altering the stack size for a Process Karlos Amiga OS -- Development 4 04-01-2007 02:59 PM
lame question about stack size. kas1e Amiga Software Issues and Discussion 1 10-06-2005 08:37 PM
VBCC: size of incomplete type not available / linker Jose Amiga OS -- Development 5 04-15-2005 10:56 AM
Arghh.. getting errors in the jpeg.library includes with VBCC Jose Amiga OS -- Development 13 09-17-2004 03:35 PM
Stack-size of "Run" programs. benJamin Amiga Software Issues and Discussion 0 04-16-2003 05:21 AM