flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > [bug]'stack' keyword crashes fasm

Author
Thread Post new topic Reply to topic
Chewy509



Joined: 19 Jun 2003
Posts: 297
Location: Bris-vegas, Australia
Chewy509 05 Jul 2007, 22:34
Hi Guys,

This is related to my previous post. I've found for larger *.asm files (eg over 500KB), fasm is crashing if I attempt to define the stack size for PE64 executables.

(See attached file as example). If I remove the stack size definition, the source file assemblies and the executable runs correctly. However having a stack size of 4K is not adequate for my application?

Additionally, on my XP x64 SP2 PC, when fasm crashes, the original source file is being deleted (I believe is the Win related not fasm related). This does NOT occur on XP SP2 (32bit).

If someone could at least show that I'm either using the stack keyword incorrectly? or confirm the presence of the bug? I would be greatly appreciated.

(In the attached source, about line 80 is the stack size definition for the PE64).


Description: Source code that fasm crashes on...
Download
Filename: b0.zip
Filesize: 79.2 KB
Downloaded: 425 Time(s)

Post 05 Jul 2007, 22:34
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 06 Jul 2007, 09:04
If FASM crashes, it's error for sure, and you are doing it correctly.

For a quick workaround, you can produce 64 bit COFF instead, and link it to executable with linker (that allows specifying default stack size)
Post 06 Jul 2007, 09:04
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3175
Location: Denmark
f0dder 06 Jul 2007, 11:43
Chewy509: your source file is being deleted? :O

Does this happen with the command-line fasm.exe , or the fasmw.exe editor? Sounds pretty nasty.
Post 06 Jul 2007, 11:43
View user's profile Send private message Visit poster's website Reply with quote
Chewy509



Joined: 19 Jun 2003
Posts: 297
Location: Bris-vegas, Australia
Chewy509 09 Jul 2007, 00:37
f0dder wrote:
Chewy509: your source file is being deleted? :O

Does this happen with the command-line fasm.exe , or the fasmw.exe editor? Sounds pretty nasty.


The source file is being deleted with both fasm.exe and fasmw.exe on XP x64 only. I'm assuming it's a bug within the x64 version of Windows, as it doesn't happen on the 32bit version of Windows XP.

If someone happens to have a running XP x64 box, can you please test it. (It could be some setting on my box).
Post 09 Jul 2007, 00:37
View user's profile Send private message Visit poster's website Reply with quote
Chewy509



Joined: 19 Jun 2003
Posts: 297
Location: Bris-vegas, Australia
Chewy509 09 Jul 2007, 00:39
vid wrote:
If FASM crashes, it's error for sure, and you are doing it correctly.

For a quick workaround, you can produce 64 bit COFF instead, and link it to executable with linker (that allows specifying default stack size)

Thanks for the workaround. Very Happy

For the moment I'm using a PE header editor (there's heaps on the internet) and just manually modifying the field in the header. It's working ok for now.
Post 09 Jul 2007, 00:39
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 05 Aug 2007, 16:15
Fixed in 1.67.22 (coming later today).
Post 05 Aug 2007, 16:15
View user's profile Send private message Visit poster's website Reply with quote
Chewy509



Joined: 19 Jun 2003
Posts: 297
Location: Bris-vegas, Australia
Chewy509 12 Aug 2007, 23:40
Tomasz Grysztar wrote:
Fixed in 1.67.22 (coming later today).

Thanks, how's the studying going?
Post 12 Aug 2007, 23:40
View user's profile Send private message Visit poster's website Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 13 Aug 2007, 11:10
1.67.21 - source isn't deleted on Server 2003 Enterprise x64 Edition
It took a long time to assemble, though.
1.67.22 - assembles OK! 4 passes, 0.9 seconds, 146944 bytes
Post 13 Aug 2007, 11:10
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger 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.