flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > fasmarm bug, "error: undefined symbol " [fixed]

Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17473
Location: In your JS exploiting you and your system
revolution
With version 1.67.26, I have seen with the wrong label name printed with the error message "error: undefined symbol 'somevariable'".

So far I have been unable to make minimal code to reproduce the problem.

Basically, the bug appears when there are multiple missing labels in separate lines of code. fasm displays the first line of code and a different missing symbol.

The following example doesn't yield to a simple few lines of code to reproduce the problem Sad It seems to only occur in the context of the larger program. I can't post the whole code here, so this will have to serve as a preliminary report until I can narrow down the problem some more.

Code:
...
mov r0,not_a_symbol
mov r1,also_not_a_symbol
...    


Code:
flat assembler for ARM  version 1.67.26  (160000 kilobytes memory)
test_gpio.asm [7173]:
mov r0,not_a_symbol
error: undefined symbol 'also_not_a_symbol'.    


Last edited by revolution on 13 Jul 2008, 06:38; edited 1 time in total
Post 16 Apr 2008, 04:21
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4240
Location: 2018
edfed
this problem was still there in fasm 1.67.25
Post 16 Apr 2008, 08:36
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
i think i'll start new policy for tomasz to easier notice bugreports when he comes here: highlight bugreport thread
Post 16 Apr 2008, 08:41
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17473
Location: In your JS exploiting you and your system
revolution
vid wrote:
i think i'll start new policy for tomasz to easier notice bugreports when he comes here: highlight bugreport thread
Good idea. Can I assume they are only sticky's until confirmed fixed?
Post 16 Apr 2008, 09:00
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
I hope Tomasz will realize that Wink
Post 16 Apr 2008, 09:47
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4240
Location: 2018
edfed
maybe he is a little bored to code FASM since 10 years now.
FASM is also a bit complete since 1.64, it just need a possibility to extend the opcodes/mnemonics lists with a configuration file or an include...
Post 16 Apr 2008, 09:51
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17473
Location: In your JS exploiting you and your system
revolution
edfed wrote:
maybe he is a little bored to code FASM since 10 years now.
FASM is also a bit complete since 1.64, it just need a possibility to extend the opcodes/mnemonics lists with a configuration file or an include...
There has been such a thing around for a long time, it is called a table assembler. They are usually not very flexible and mostly you have to make lots of sacrifices in terms of performance and code generation.
Post 16 Apr 2008, 10:03
View user's profile Send private message Visit poster's website Reply with quote
AlexP



Joined: 14 Nov 2007
Posts: 561
Location: Out the window. Yes, that one.
AlexP
I think there should be a plug-in for the tables used by the assembler. Wouldn't that help? Then whatever instructions or different types of processors came out it'd work
Post 16 Apr 2008, 22:37
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7752
Location: Kraków, Poland
Tomasz Grysztar
Thank you, vid, for making those sticky threads for me. Things are now much simpler for me (as I begin to work on the new release - yeah, finally).
Post 09 Jul 2008, 08:38
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7752
Location: Kraków, Poland
Tomasz Grysztar
revolution: have you got any sources that would reproduce the problem for me?
Post 09 Jul 2008, 16:29
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17473
Location: In your JS exploiting you and your system
revolution
Tomasz Grysztar wrote:
revolution: have you got any sources that would reproduce the problem for me?
Oh dear, I didn't keep any non-working versions. But even if I did keep them there are three major problems. 1: It involved multiple files (40+), 2: The total size is more than 6MB, and 3: I would not be at liberty to post the entire sources.

I found it extremely difficult to make a small version of the problem. Each time I tried, fasm would correctly show the offending line (i.e. it did not produce the problem).

So, how about this: if/when I spot this problem again then instead of me trying to isolate a small code snippet I will go straight to Olly and see if I can solve it that way.
Post 09 Jul 2008, 16:39
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17473
Location: In your JS exploiting you and your system
revolution
I found the problem. In the ARM version I was not correctly saving/restoring the label_info variable. Sorry to put this as a fasm bug, it was a fasmarm bug not dealing with the new error information properly, I'm not sure how I got confused with the versions. Anyhow, I will upload a new version of fasmarm combined with the new 1.67.27 (displays as 1.67.28!) version soon.
Post 13 Jul 2008, 06:37
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 YouTube, Twitter.

Website powered by rwasa.