flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > [fasmg/fasm2]Calminstruction match-wildcard modifier

Author
Thread Post new topic Reply to topic
m_stery



Joined: 08 Nov 2024
Posts: 9
m_stery 11 Mar 2026, 14:19
flat assembler version g.l2fx
SIGSEGV
Crashes if I use an argument (with context!) from a macro as a wildcard modifier.

A quick example of a poorly chosen symbolic name:
Code:
macro   sigsegv name*
        calminstruction sigsegvf? decl&
                local   tmp
                match   tmp~name decl?,decl,~   
        end calminstruction
end macro
sigsegv name
    


To clarify, in my original code I didn't intend to use the argument as a wildcard modifier at all. I was writing an initialization macro, generating a 'name' macro where I needed helper macros, which I added afterwards.. Just a bad choice of argument name Smile

[/i]
Post 11 Mar 2026, 14:19
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8518
Location: Kraków, Poland
Tomasz Grysztar 11 Mar 2026, 15:46
Fixed in "l44v". Thank you for the report!

m_stery wrote:
To clarify, in my original code I didn't intend to use the argument as a wildcard modifier at all. I was writing an initialization macro, generating a 'name' macro where I needed helper macros, which I added afterwards.. Just a bad choice of argument name Smile
If by convention you always make macro arguments lowercase, you could switch to using "Name" or "NAME" for wildcards, to reduce the likelihood of such collision.
Post 11 Mar 2026, 15:46
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-2026, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.