flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > [BUG] FASMW huge leakage + Erroneous time measurement

Author
Thread Post new topic Reply to topic
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 16 Sep 2008, 18:28
(I have edited this post)

Try compiling the attached code several times, there will be a moment in which you will receive "Error: Out of memory" permanently and your computer will have no memory left.

I don't know what is the minimal code required, sorry... But happens even on successful compilation also.

Additionally the compilation time is seriously wrong, it reports thousands of seconds when actually it takes less than 2 seconds on my computer.


Description:
Filesize: 6.46 KB
Viewed: 5826 Time(s)

incorrect_time.PNG


Description:
Download
Filename: esf.asm
Filesize: 40.09 KB
Downloaded: 451 Time(s)



Last edited by LocoDelAssembly on 16 Sep 2008, 20:34; edited 1 time in total
Post 16 Sep 2008, 18:28
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20333
Location: In your JS exploiting you and your system
revolution 16 Sep 2008, 18:34
I get this with 100M fixed memory size:
Code:
flat assembler  version 1.67.28  (100000 kilobytes memory)
LocoDelAssemblyTest.asm [813]:
        LOCAL   hPen            :DWORD,\
error: illegal instruction.    
Post 16 Sep 2008, 18:34
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: 20333
Location: In your JS exploiting you and your system
revolution 16 Sep 2008, 18:36
How many times should I run it? I've put it in a batch file to loop and so far after a few hundreds of runs I can see no memory leak in task manager.
Post 16 Sep 2008, 18:36
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: 20333
Location: In your JS exploiting you and your system
revolution 16 Sep 2008, 18:47
Oh shit, I very stupid, you said FASMW. I was using FASM. Sorry Embarassed
Post 16 Sep 2008, 18:47
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 16 Sep 2008, 19:01
Yet I think it is worth to mention my settings, I'm using 65536 KB of memory and on each (failed) compilation (Ctrl+F9) I lose 64 MB of memory. I have even received the yellow balloon warning me that there is no more memory and that Windows will try to expand it.

Once I have it fully ported to FASM (I went to lunch after creating this thread), I'll check if a successful compilation also leaks memory.
Post 16 Sep 2008, 19:01
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8353
Location: Kraków, Poland
Tomasz Grysztar 16 Sep 2008, 20:25
It seems that it is losing the whole fasm's core thread's memory block (it is allocated only one once per compilation). Thus perhaps the assembly thread goes into some wrong place and doesn't clean up or something...
Post 16 Sep 2008, 20:25
View user's profile Send private message Visit poster's website Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 16 Sep 2008, 20:37
Tomasz, I have edited my post, now the code is compilable and executable and I found an extra bug (I edited the thread's title to reflect that).
Post 16 Sep 2008, 20:37
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 16 Sep 2008, 22:41
OK, I've found the minimal code:
Code:
abc fix  ; the symbol must be 3 chars wide at least to trigger the bug    


And this one to trigger the time bug at the same time:
Code:
qweaaaa fix
    
(Around 9,000.00 seconds)

So the bug may be related to http://board.flatassembler.net/topic.php?t=9131
Post 16 Sep 2008, 22:41
View user's profile Send private message 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.