flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Compiler Internals > [fasmg] Error: exceeded the maximum allowed depth of stack.

Author
Thread Post new topic Reply to topic
zhak



Joined: 12 Apr 2005
Posts: 473
Location: Belarus
[fasmg] Error: exceeded the maximum allowed depth of stack.
This error I got with my crooked hands and invalid input Smile


Code:

struc named_datatype type*, args&
  label . : type
  type args
  .__length = $ - .
end struc

struc byte? args&
  named_datatype byteargs
end struc

vars byte 0x30


Post 29 Mar 2017, 22:27
View user's profile Send private message Reply with quote
zhak



Joined: 12 Apr 2005
Posts: 473
Location: Belarus
Although not sure if it needs to be addressed
Post 29 Mar 2017, 22:32
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6518
Location: Kraków, Poland
This limit was put in there in order to detect infinite recursion. Since your code contains one, we can say that the safety measure worked correctly. Smile

If you ever hit the limit while there is no infinite recursion, keep in mind that you can adjust the limit from the command line.
Post 30 Mar 2017, 09:21
View user's profile Send private message Visit poster's website Reply with quote
zhak



Joined: 12 Apr 2005
Posts: 473
Location: Belarus
The above code prints lots of garbage to console prior to error message, when assembled. Maybe this could be tuned somehow to be avoided?
Post 30 Mar 2017, 13:14
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 6518
Location: Kraków, Poland

zhak wrote:
The above code prints lots of garbage to console prior to error message, when assembled. Maybe this could be tuned somehow to be avoided?

It's not exactly a garbage, it is a complete report of source context where the error happened, formatted consistently with the usual fasm's method of showing where and what line was assembled when the error was encountered. I could skip this and display only the error message like in the case of "out of memory" error, but here showing the line can be actually helpful, because it demonstrates where the infinite recursion happened and what macro/file got processed recursively.
Post 30 Mar 2017, 13:21
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >

Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2016, Tomasz Grysztar.