flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Stack overflow at $416C95

Author
Thread Post new topic Reply to topic
bitRAKE



Joined: 21 Jul 2003
Posts: 3055
Location: vpcmipstrm
bitRAKE
Code:
; map
macro F {
 macro G H,[I] \{ common
  match J!K,I \\{
   F
   H J
   G H,K \\} \}} F

G mov,eax,ebx!ebx,ecx!!    
It works with a different separator character.

Stack looks like:

FASMW.EXE!004166ec()
FASMW.EXE!00416a61()
FASMW.EXE!00416409()
.
.
.
FASMW.EXE!00416a61()
FASMW.EXE!00416319()
FASMW.EXE!00416a61()
FASMW.EXE!00416409()
FASMW.EXE!00416a61()
FASMW.EXE!00416319()
FASMW.EXE!004155ed()
FASMW.EXE!00415562()
FASMW.EXE!0041490d()
kernel32.dll!75493677()

Latest version of course.

_________________
¯\(°_o)/¯ unlicense.org
Post 23 Nov 2010, 11:47
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7802
Location: Kraków, Poland
Tomasz Grysztar
bitRAKE wrote:
It works with a different separator character.
! is not a special character in fasm, it becomes a part of name. So the bug demonstration can be reduced to:
Code:
; map
macro F { 
 macro G H,[I] \{ common 
  match JK,I \\{
   F 
   H J 
   G H,K \\} \}} F 

G mov,eax,ebx    
Obviosly we have an infinite recursion here - but for some reason the fasm's stack overflow detection fails in this case...
Post 23 Nov 2010, 11:52
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7802
Location: Kraków, Poland
Tomasz Grysztar
Console version signals the error correctly - so it is a bug in FASMW.

PS I corrected the highlighting algorithm of this board to match the FASMW's one with respect to "!" character.
Post 23 Nov 2010, 11:59
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7802
Location: Kraków, Poland
Tomasz Grysztar
Yeah, stack overflow detector was not set up correctly by FASMW, so it was not working at all. Version 0.95.03 has it corrected.
Post 23 Nov 2010, 12:04
View user's profile Send private message Visit poster's website Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 3055
Location: vpcmipstrm
bitRAKE
Thank you, for the speedy reply.
Luckily, I didn't notice my mistake until afterwards.
Post 23 Nov 2010, 12:15
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


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.