[Nasm-bugs] [Bug 3392505] either a segfault or 'interminable macro recursion' with -fobj
noreply-nasm at gorcunov.org
noreply-nasm at gorcunov.org
Thu Aug 16 09:57:50 PDT 2018
https://bugzilla.nasm.us/show_bug.cgi?id=3392505
--- Comment #2 from Ozkan Sezer <sezeroz at gmail.com> ---
> (Going from 2.13.01 to 2.13.02 seems to have either
> fixed or hid this: it it was really fixed in 2.13.02, can you
> please point me to the relevant commit?)
Merging preproc.c fixes from 2.13.xx branch to 2.12.xx solved it.
Although, the output is not expected (with all nasm versions):
$ cat 1.asm
%define TEXT _TEXT align=1 public use32 class=CODE FLAT
%define DATA _DATA align=4 public use32 class=DATA FLAT
%define CONST CONST2 align=4 public use32 class=DATA FLAT
segment TEXT
segment DATA
segment CONST
$ nasm -E 1.asm
%line 4+1 1.asm
[segment _TEXT align=1 public use32 class=CODE FLAT]
[segment _DATA align=4 public use32 class=_DATA align=4 public use32 class=DATA
FLAT FLAT]
[segment CONST2 align=4 public use32 class=_DATA align=4 public use32
class=_DATA align=4 public use32 class=DATA FLAT FLAT FLAT]
I guess defining certain keywords makes it go haywire, so
my solution was changing the source like:
%define SEG_TEXT _TEXT align=1 public use32 class=CODE FLAT
%define SEG_DATA _DATA align=4 public use32 class=DATA FLAT
%define SEG_CONST CONST2 align=4 public use32 class=DATA FLAT
segment SEG_TEXT
segment SEG_DATA
segment SEG_CONST
... which does what is intended:
$ nasm -E 1.asm
%line 4+1 1.asm
[segment _TEXT align=1 public use32 class=CODE FLAT]
[segment _DATA align=4 public use32 class=DATA FLAT]
[segment CONST2 align=4 public use32 class=DATA FLAT]
--
You are receiving this mail because:
You are watching all bug changes.
You are on the CC list for the bug.
More information about the Nasm-bugs
mailing list