From: SourceForge.net <no...@so...> - 2011-03-05 22:10:51
|
Bugs item #3200749, was opened at 2011-03-06 00:12 Message generated for change (Comment added) made by cyrillos You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106208&aid=3200749&group_id=6208 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Preprocessor Bugs Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Strange behaviour with %define Initial Comment: I tried compiling a code like this (nasm 2.09.04): %define IFNDEF %ifndef %define ENDIF %endif IFNDEF foo ;bar ENDIF but I get an error: $ nasm test.mac test.mac:4: error: label or instruction expected at start of line test.mac:6: error: label or instruction expected at start of line when I invoke nasm -e it prints: $ nasm -e test.mac %line 3+1 test.mac %ifndef foo %endif what is basicaly what I want and what in this form compiles ok. Driven by curiosity I tried invoking nasm -a on my source file and with that it crashed: $ nasm -a test.mac test.mac:1: error: label or instruction expected at start of line test.mac:2: error: label or instruction expected at start of line test.mac:4: error: parser: instruction expected *** glibc detected *** nasm: double free or corruption (!prev): 0x081147b8 *** ======= Backtrace: ========= /lib/libc.so.6(+0x6b861)[0xb7663861] /lib/libc.so.6(+0x6d0c8)[0xb76650c8] /lib/libc.so.6(cfree+0x6d)[0xb76681ad] /lib/libc.so.6(fclose+0x152)[0xb76538c2] nasm[0x804b175] nasm[0x804c6f7] /lib/libc.so.6(__libc_start_main+0xe6)[0xb760ebb6] nasm[0x8049131] ======= Memory map: ======== 08048000-080cf000 r-xp 00000000 08:17 29454250 /usr/bin/nasm 080cf000-080d0000 r--p 00086000 08:17 29454250 /usr/bin/nasm 080d0000-080d1000 rw-p 00087000 08:17 29454250 /usr/bin/nasm 080d1000-08120000 rw-p 00000000 00:00 0 [heap] b7400000-b7421000 rw-p 00000000 00:00 0 b7421000-b7500000 ---p 00000000 00:00 0 b759a000-b75b4000 r-xp 00000000 08:17 20983347 /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/libgcc_s.so.1 b75b4000-b75b5000 r--p 00019000 08:17 20983347 /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/libgcc_s.so.1 b75b5000-b75b6000 rw-p 0001a000 08:17 20983347 /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/libgcc_s.so.1 b75b6000-b75f8000 rw-p 00000000 00:00 0 b75f8000-b7738000 r-xp 00000000 08:15 866952 /lib/libc-2.11.2.so b7738000-b773a000 r--p 0013f000 08:15 866952 /lib/libc-2.11.2.so b773a000-b773b000 rw-p 00141000 08:15 866952 /lib/libc-2.11.2.so b773b000-b773e000 rw-p 00000000 00:00 0 b7767000-b7768000 rw-p 00000000 00:00 0 b7768000-b7769000 r-xp 00000000 00:00 0 [vdso] b7769000-b7785000 r-xp 00000000 08:15 867489 /lib/ld-2.11.2.so b7785000-b7786000 r--p 0001b000 08:15 867489 /lib/ld-2.11.2.so b7786000-b7787000 rw-p 0001c000 08:15 867489 /lib/ld-2.11.2.so bf8cb000-bf8ed000 rw-p 00000000 00:00 0 [stack] Przerwane ---------------------------------------------------------------------- Comment By: Cyrill Gorcunov (cyrillos) Date: 2011-03-06 01:10 Message: for me looks like a bug but to be sure I need to find some spare time for review, I'll try to resolve this in a couple of days, ok? ---------------------------------------------------------------------- Comment By: Wojciech Migda (wmigda) Date: 2011-03-06 01:05 Message: I have not tried 2.09.06 bc it is not in gentoo's portage tree. I can see you've reproduced double free on 2.09.06, but what do you think about the nasm's problem with the shown preprocessor directives construction ? Is it a bug or a design ? ---------------------------------------------------------------------- Comment By: Cyrill Gorcunov (cyrillos) Date: 2011-03-06 00:33 Message: ok, bug on double free confirmed with 2.09.06. i'll check, thanks again! ---------------------------------------------------------------------- Comment By: Cyrill Gorcunov (cyrillos) Date: 2011-03-06 00:30 Message: hmm, have you tried 2.09.06? ---------------------------------------------------------------------- Comment By: Cyrill Gorcunov (cyrillos) Date: 2011-03-06 00:28 Message: Thanks for report! 2.10rc series is under review so for stable projects use 2.09.xx series (just for info). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=106208&aid=3200749&group_id=6208 |