Terraspace / UASM

UASM - Macro Assembler
http://www.terraspace.co.uk/uasm.html
Other
220 stars 49 forks source link

A2168 error #50

Closed gwoltman closed 7 years ago

gwoltman commented 7 years ago

Running hjwasm 2.28 on a 64-bit linux system (32-bit Windows version still crashes rather than displaying error messages), I get a rather unhelpful error message:

Error A2168: General Failure

Command line: ./hjwasm -archAVX -DX86_64 -DWINDOWS64 -DARCH=FMA3 yr4dwpn.asm

Source code:
https://www.dropbox.com/s/b5mptuq6hxs3es6/hjbug.tgz?dl=0

The Windows 32-bit debug version you built for me was not helpful in tracking down the Windows crash bug. MSVC 2005 won't attach to the crashed executable. I do not have a newer MSVC version.

gwoltman commented 7 years ago

Good news on the Windows 32-bit front. I revisited the bug report from the previous time I mentioned this problem and it suggested a workaround. If I close MSVC 2005, I can get error messages and make forward progress. So, I'm happy - feel free to pursue the linux error message at your leisure.

john-terraspace commented 7 years ago

I think I may know what the issue with the 32bit hjwasm is, I’m trying something now and will revert once there is a fix in place for you to test.

John

From: gwoltman [mailto:notifications@github.com] Sent: 01 May 2017 05:22 AM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: Re: [Terraspace/HJWasm] A2168 error (#50)

Good news on the Windows 32-bit front. I revisited the bug report from the previous time I mentioned this problem and it suggested a workaround. If I close MSVC 2005, I can get error messages and make forward progress. So, I'm happy - feel free to pursue the linux error message at your leisure.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/50#issuecomment-298283883 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVLab7Zotqh5udILKigwNEhOX3lhiks5r1V3rgaJpZM4NM0BN .

john-terraspace commented 7 years ago

How do I get this to assemble under Windows ?

I get a long list of error output trying.. part of which does include a general failure which I “sort-of” managed to track down to:

vfmsub132pd ymm12, ymm10, ymm13

is the line, which in the assembler is at:

parser.c line 3520

else if (CodeInfo.token < T_VGETMANTPD || CodeInfo.token > T_VGETMANTPS )

        unsigned flags = GetValueSp(opndx[CurrOpnd].base_reg->tokval);

Clearly there is no base_reg.. so boom..

After much more digging.. the crash occurs in the expression evaluator, because .. somehow ymm10 is defined as a symbol:

SymFind("ymm10")

0x0000000000e04760 {nextitem=0x0000000000000000 name=0x0000000000e047e0 "ymm10" offset=0 ...}

nextitem: 0x0000000000000000 <NULL>

name: 0x0000000000e047e0 "ymm10"

offset: 0

value: 0

uvalue: 0

string_ptr: 0x0000000000000000 <NULL>

substitute: 0x0000000000000000 <NULL>

func_ptr: 0x0000000000000000

class_lname_idx: 0

hasinvoke: 0

segment: 0x0000000000000000 <NULL>

state: SYM_UNDEFINED (0)

mem_type: MT_EMPTY (192)

used: 1 '\x1'

isdefined: 0 '\0'

scoped: 0 '\0'

iat_used: 0 '\0'

isequate: 0 '\0'

predefined: 0 '\0'

variable: 0 '\0'

ispublic: 0 '\0'

list: 1 '\x1'

isarray: 0 '\0'

isdata: 0 '\0'

isproc: 0 '\0'

issaved: 0 '\0'

fwdref: 1 '\x1'

included: 0 '\0'

isparam: 0 '\0'

first_size: 0

Ofssize: 0 '\0'

is_ptr: 0 '\0'

ptr_memtype: 0 '\0'

asmpass: 0 '\0'

seg_ofssize: 0 '\0'

iscomm: 0 '\0'

weak: 0 '\0'

isfar: 0 '\0'

is_vararg: 0 '\0'

mac_vararg: 0 '\0'

isfunc: 0 '\0'

label: 0 '\0'

mac_multiline: 0 '\0'

purged: 0 '\0'

first_length: 0

max_mbr_size: 0

target_type: 0x0000000000000000 <NULL>

regist: 0x0000000000e04798 {0, 0}

total_size: 0

value3264: 0

dll: 0x0000000000000000 <NULL>

max_offset: 0

total_length: 0

altname: 0x0000000000000000 <NULL>

debuginfo: 0x0000000000000000 <NULL>

sfunc_ptr: 0x0000000000000000

cvtyperef: 0

typekind: 0 '\0'

name_size: 5 '\x5'

langtype: LANG_NONE (0)

type: 0x0000000000000000 <NULL>

ttype: 0x0000000000000000 <NULL>

bp_fixup: 0x0000000000e047e8 {nextbp=0x0000000000000000 <NULL> nextrlc=0x0000000000e046d8 {nextbp=0x0000000000e01e18 {...} ...} ...}

ext_idx: 14698472

ext_idx1: 18408

ext_idx2: 224

So it’s picking that up instead of ymm10 the register! Don’t know how this could happen?

From: gwoltman [mailto:notifications@github.com] Sent: 01 May 2017 05:09 AM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [Terraspace/HJWasm] A2168 error (#50)

Running hjwasm 2.28 on a 64-bit linux system (32-bit Windows version still crashes rather than displaying error messages), I get a rather unhelpful error message:

Error A2168: General Failure

Command line: ./hjwasm -archAVX -DX86_64 -DWINDOWS64 -DARCH=FMA3 yr4dwpn.asm

Source code: https://www.dropbox.com/s/b5mptuq6hxs3es6/hjbug.tgz?dl=0

The Windows 32-bit debug version you built for me was not helpful in tracking down the Windows crash bug. MSVC 2005 won't attach to the crashed executable. I do not have a newer MSVC version.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/50 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVN-DrGJhhJqXlpb6--Z_Oc8GKfs2ks5r1VrKgaJpZM4NM0BN .

john-terraspace commented 7 years ago

Please try:

www.terraspace.co.uk/hjwasm32.zip http://www.terraspace.co.uk/hjwasm32.zip

To see if this resolves the 32bit Windows crash.

In addition we’ve added a new built-in variable @Platform which will be:

0 = Win32

1 = Win64

2 = Elf (32)

3 = Elf (64)

4 = OSX (once we add Macho)

So it should be useful for conditional assembly of code blocks for different targets, might be useful for you.

Cheers,

John

From: gwoltman [mailto:notifications@github.com] Sent: 01 May 2017 05:09 AM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [Terraspace/HJWasm] A2168 error (#50)

Running hjwasm 2.28 on a 64-bit linux system (32-bit Windows version still crashes rather than displaying error messages), I get a rather unhelpful error message:

Error A2168: General Failure

Command line: ./hjwasm -archAVX -DX86_64 -DWINDOWS64 -DARCH=FMA3 yr4dwpn.asm

Source code: https://www.dropbox.com/s/b5mptuq6hxs3es6/hjbug.tgz?dl=0

The Windows 32-bit debug version you built for me was not helpful in tracking down the Windows crash bug. MSVC 2005 won't attach to the crashed executable. I do not have a newer MSVC version.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/50 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVN-DrGJhhJqXlpb6--Z_Oc8GKfs2ks5r1VrKgaJpZM4NM0BN .

gwoltman commented 7 years ago

This does not assemble under Windows. I moved the source over to linux in hopes of getting the error messages that the 32-bit Windows hjwasm crashed trying to display.

Linux hjwasm first reported that include file ksamd64.inc was not found. Rather than find these files and bring them over to linux, I commented out the include in unravel.mac. That's when I started getting the "general failure" message. At that point, I gave up and went back to Windows.

I thought you might find this an interesting error case.

Regards, George

john-terraspace commented 7 years ago

It really is interesting, what has got me puzzled is that when I step it through (as far as possible) under Windows it dies at a point where somehow it seems to think YMM10 is a symbol table entry instead of a register! I can’t find anywhere that you might being setting some sort of equate for YMM that’s going wrong somehow ?

Did you get a chance to try the updated Windows 32bit hjwasm ?

On a side a note, we’ve put in an experimental implementation of the SystemV ABI calling convention, it’s not 100% yet but we should have that out shortly.

So in theory, using @Platform and bog standard PROC (you no longer need the frame directive) the same functions should assemble and be invokable from Win64, Elf64 and OSX.

We’ve added in support for Borland register call and now fully support switching between rbp or rsp stackbases..

Option stackbase:rbp

Option win64:7

Or

Option stackbase:rsp

Option win64:15

For SystemV we’ve also added an OPTION REDZONE, so you can dynamically switch that optimisation on/off for leaf procedures.

From: gwoltman [mailto:notifications@github.com] Sent: 01 May 2017 06:11 PM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment comment@noreply.github.com Subject: Re: [Terraspace/HJWasm] A2168 error (#50)

This does not assemble under Windows. I moved the source over to linux in hopes of getting the error messages that the 32-bit Windows hjwasm crashed trying to display.

Linux hjwasm first reported that include file ksamd64.inc was not found. Rather than find these files and bring them over to linux, I commented out the include in unravel.mac. That's when I started getting the "general failure" message. At that point, I gave up and went back to Windows.

I thought you might find this an interesting error case.

Regards, George

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/50#issuecomment-298376687 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVPIKc5IO7n2S9vmzCbe45sc2GlIvks5r1hI7gaJpZM4NM0BN .

gwoltman commented 7 years ago

The ymm10 problem sounds like memory corruption. My code shouldn't redefine ymm10.

I did try the new 32-bit executable. Both the old and new crash if there are any errors and I request a listing.

john-terraspace commented 7 years ago

Is it just the listing the causes it ?

From: gwoltman [mailto:notifications@github.com] Sent: 01 May 2017 08:12 PM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment comment@noreply.github.com Subject: Re: [Terraspace/HJWasm] A2168 error (#50)

The ymm10 problem sounds like memory corruption. My code shouldn't redefine ymm10.

I did try the new 32-bit executable. Both the old and new crash if there are any errors and I request a listing.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/50#issuecomment-298405937 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVLZztJP4Qu7jKplktnwPqsrtwuLSks5r1i57gaJpZM4NM0BN .

gwoltman commented 7 years ago

The listing argument makes crashes more likely, but it is not a requirement.

I've rebooted my VM with more memory in hopes that would reduce the crashing.

If assembling error-free source code, hjwasm does not crash with or without listings. If assembling error-ridden code without a listing, hjwasm outputs error messages to the console. But, prior to rebooting, I've seen this crash with other apps active. If assembling error-ridden code with a listing, hjwasm crashes before outputting any error messages to the console.

john-terraspace commented 7 years ago

Can you try this version again please?

www.terrapsace.co.uk/hjwasm32.zip http://www.terrapsace.co.uk/hjwasm32.zip

From: gwoltman [mailto:notifications@github.com] Sent: 01 May 2017 11:25 PM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment comment@noreply.github.com Subject: Re: [Terraspace/HJWasm] A2168 error (#50)

The listing argument makes crashes more likely, but it is not a requirement.

I've rebooted my VM with more memory in hopes that would reduce the crashing.

If assembling error-free source code, hjwasm does not crash with or without listings. If assembling error-ridden code without a listing, hjwasm outputs error messages to the console. But, prior to rebooting, I've seen this crash with other apps active. If assembling error-ridden code with a listing, hjwasm crashes before outputting any error messages to the console.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/50#issuecomment-298448893 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVK8XCjEh5Rpn3SpS4F1qV-7fjQcbks5r1lujgaJpZM4NM0BN .

gwoltman commented 7 years ago

Still crashes if there are any errors and list file requested.

john-terraspace commented 7 years ago

It’s so strange, I’ve not been able to reproduce it this side on win7 and win10 using hjwasm32 yet.

I’ve create recursively wrong macros and let them run till there are too many errors with and without listing fine.

What OS is this happening on ? and you mentioned it’s inside a VM.. perhaps I need to do something similar to test.

From: gwoltman [mailto:notifications@github.com] Sent: 02 May 2017 02:18 AM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment comment@noreply.github.com Subject: Re: [Terraspace/HJWasm] A2168 error (#50)

Still crashes if there are any errors and list file requested.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/50#issuecomment-298474018 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVGij8GGNR72qmqRiUVMMdBBiPwcAks5r1oRJgaJpZM4NM0BN .

john-terraspace commented 7 years ago

I have tested 2.29 build now on Linux 64 and OSX 64bit with the below and both assemble without error for me.

Please try the new Linux build 2.29 on the site, it’s now compiled using Clang instead of GCC, which resolves the issues.

From: gwoltman [mailto:notifications@github.com] Sent: 01 May 2017 05:09 AM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [Terraspace/HJWasm] A2168 error (#50)

Running hjwasm 2.28 on a 64-bit linux system (32-bit Windows version still crashes rather than displaying error messages), I get a rather unhelpful error message:

Error A2168: General Failure

Command line: ./hjwasm -archAVX -DX86_64 -DWINDOWS64 -DARCH=FMA3 yr4dwpn.asm

Source code: https://www.dropbox.com/s/b5mptuq6hxs3es6/hjbug.tgz?dl=0

The Windows 32-bit debug version you built for me was not helpful in tracking down the Windows crash bug. MSVC 2005 won't attach to the crashed executable. I do not have a newer MSVC version.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/50 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVN-DrGJhhJqXlpb6--Z_Oc8GKfs2ks5r1VrKgaJpZM4NM0BN .

gwoltman commented 7 years ago

The linux "General Failure" problem is resolved in 2.29.

As expected, win32 version crashes if there are errors and a listing is requested. I am running under Vista.

Here's what I tried today:

1) I tried copying the error-free source to linux and building there. I cannot get this to work as hjwasm 2.29 complains about every FMA instruction. Is there some OPTION setting I need? If so, I wonder why I'm able to assemble the same source code with FMA3 instructions using win32 hjwasm.

I've discovered the -EP command line argument which is proving useful. Here is sample output from the failed linux attempt: vmovapd ymm3,[rsi+(2+1)*64+rbx+4*64+32] vmovapd [rsi+2*64], ymm2 vmovapd ymm2, ymm13 yr4dwpn.asm(31) : Error A2049: Invalid instruction operands yfmaddpd(51)[ybasics.mac]: Macro called from exec(1)[unravel.mac]: Macro called from yr3_6r_fft_unroll(43)[yr4dwpn.asm]: Macro called from yr3_6r_fft_cmn(5)[yr4dwpn.asm]: Macro called from yr3_f3cl_2sc_six_reals_fft(1)[yr3.mac]: Macro called from yr4dwpn_pass2_48_real(35)[yr4dwpnpass2.mac]: Macro called from ypass2gen(53)[ymult.mac]: Macro called from buildfor(22)[yarch.mac]: Macro called from yr4dwpn.asm(31): Main line code vfmadd213pd ymm2, ymm8, ymm3

2) Using the -EP argument on a crashing win32 run (source code has errors, listing requested). Here is the last output before the crash:

loops_initial_value = 0 loops_count_is_power_of_two = 0 mov eax, 9999 ??0025: org ??0025-4 DD loops_initial_value

Maybe this is useful info, maybe not.

gwoltman commented 7 years ago

In case the linux problem is a reincarnation of the ymm10 problem, here is how I produced it:

Source code: https://www.dropbox.com/s/wh120h5mi00rv8u/hjwasm_problem.tar.gz?dl=0

Command line: hjwasm -DX86_64 -DARCH=FMA3 -EP -DWINDOWS64 -win64 yr4dwpn.asm

john-terraspace commented 7 years ago

I’ve just grabbed this last package from dropbox put it onto my linux box and assembled it with 2.29 as follows:

john@Nix:~/HJWasm/GccUnixR$ ./hjwasm -DWINDOWS64 -archAVX -DX86_X64 -DARCH=FMA3 ../gw3/yr4dwpn.asm

HJWasm v2.29, May 2 2017, Masm-compatible assembler.

Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.

Source code is available under the Sybase Open Watcom Public License.

../gw3/yr4dwpn.asm: 475 lines, 2 passes, 108488 ms, 0 warnings, 0 errors

AND

john@Nix:~/HJWasm/GccUnixR$ ./hjwasmNIX64 -DWINDOWS64 -DX86_X64 -DARCH=FMA3 ../gw3/yr4dwpn.asm

HJWasm v2.29, May 2 2017, Masm-compatible assembler.

Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.

Source code is available under the Sybase Open Watcom Public License.

../gw3/yr4dwpn.asm: 475 lines, 2 passes, 104823 ms, 0 warnings, 0 errors

Both with and without –archAVX.

However.. if I use –win64, I get the following errors:

../gw3/yr4dwpn.asm(13) : Warning A4095: Multiple .MODEL directives, .MODEL ignored

../gw3/yr4dwpn.asm(13) : Error A2132: Incompatible CPU mode for 64-bit segment

../gw3/yr4dwpn.asm(13) : Error A2132: Incompatible CPU mode for 64-bit segment

Which I’m not sure about, but it’s definitely not the same errors you’re getting ?

I’m running Ubuntu 16.04 64bit.

From: gwoltman [mailto:notifications@github.com] Sent: 03 May 2017 01:37 AM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment comment@noreply.github.com Subject: Re: [Terraspace/HJWasm] A2168 error (#50)

The linux "General Failure" problem is resolved in 2.29.

As expected, win32 version crashes if there are errors and a listing is requested. I am running under Vista.

Here's what I tried today:

  1. I tried copying the error-free source to linux and building there. I cannot get this to work as hjwasm 2.29 complains about every FMA instruction. Is there some OPTION setting I need? If so, I wonder why I'm able to assemble the same source code with FMA3 instructions using win32 hjwasm.

I've discovered the -EP command line argument which is proving useful. Here is sample output from the failed linux attempt: vmovapd ymm3,[rsi+(2+1)64+rbx+464+32] vmovapd [rsi+2*64], ymm2 vmovapd ymm2, ymm13 yr4dwpn.asm(31) : Error A2049: Invalid instruction operands yfmaddpd(51)[ybasics.mac]: Macro called from exec(1)[unravel.mac]: Macro called from yr3_6r_fft_unroll(43)[yr4dwpn.asm]: Macro called from yr3_6r_fft_cmn(5)[yr4dwpn.asm]: Macro called from yr3_f3cl_2sc_six_reals_fft(1)[yr3.mac]: Macro called from yr4dwpn_pass2_48_real(35)[yr4dwpnpass2.mac]: Macro called from ypass2gen(53)[ymult.mac]: Macro called from buildfor(22)[yarch.mac]: Macro called from yr4dwpn.asm(31): Main line code vfmadd213pd ymm2, ymm8, ymm3

  1. Using the -EP argument on a crashing win32 run (source code has errors, listing requested). Here is the last output before the crash:

loops_initial_value = 0 loops_count_is_power_of_two = 0 mov eax, 9999 ??0025: org ??0025-4 DD loops_initial_value

Maybe this is useful info, maybe not.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/50#issuecomment-298798785 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVBNIZWraBvMWqtQwNB03Z9WJkWkYks5r18xDgaJpZM4NM0BN .

john-terraspace commented 7 years ago

I’m running out of ideas about the 32bit OS issue, I can’t find any memory-leaks or heap corruption issues and I don’t have access to a 32bit PC to test it on. I will try to see if I can get one setup as a VM somewhere… in the meantime I assume the Windows64 and Linux are the most important platforms to have running, I assume you’re using 64bit linux?

From: gwoltman [mailto:notifications@github.com] Sent: 03 May 2017 01:37 AM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment comment@noreply.github.com Subject: Re: [Terraspace/HJWasm] A2168 error (#50)

The linux "General Failure" problem is resolved in 2.29.

As expected, win32 version crashes if there are errors and a listing is requested. I am running under Vista.

Here's what I tried today:

  1. I tried copying the error-free source to linux and building there. I cannot get this to work as hjwasm 2.29 complains about every FMA instruction. Is there some OPTION setting I need? If so, I wonder why I'm able to assemble the same source code with FMA3 instructions using win32 hjwasm.

I've discovered the -EP command line argument which is proving useful. Here is sample output from the failed linux attempt: vmovapd ymm3,[rsi+(2+1)64+rbx+464+32] vmovapd [rsi+2*64], ymm2 vmovapd ymm2, ymm13 yr4dwpn.asm(31) : Error A2049: Invalid instruction operands yfmaddpd(51)[ybasics.mac]: Macro called from exec(1)[unravel.mac]: Macro called from yr3_6r_fft_unroll(43)[yr4dwpn.asm]: Macro called from yr3_6r_fft_cmn(5)[yr4dwpn.asm]: Macro called from yr3_f3cl_2sc_six_reals_fft(1)[yr3.mac]: Macro called from yr4dwpn_pass2_48_real(35)[yr4dwpnpass2.mac]: Macro called from ypass2gen(53)[ymult.mac]: Macro called from buildfor(22)[yarch.mac]: Macro called from yr4dwpn.asm(31): Main line code vfmadd213pd ymm2, ymm8, ymm3

  1. Using the -EP argument on a crashing win32 run (source code has errors, listing requested). Here is the last output before the crash:

loops_initial_value = 0 loops_count_is_power_of_two = 0 mov eax, 9999 ??0025: org ??0025-4 DD loops_initial_value

Maybe this is useful info, maybe not.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/50#issuecomment-298798785 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVBNIZWraBvMWqtQwNB03Z9WJkWkYks5r18xDgaJpZM4NM0BN .

john-terraspace commented 7 years ago

With regards to my previously mentioned output with the .MODEL etc/related errors.. it appears the bug in hjwasm (and apparently goes back to jwasm as well) is when you’re more than one level deep in the path.

If the code is in say

D:\gw

It works

If you’re in

D:\gw\gw2

It gives those errors.

Will correct this now as part of 2.30, but it still doesn’t explain why you’d be having FMA instruction errors as it builds perfectly for me on Linux64 and Windows64.

From: gwoltman [mailto:notifications@github.com] Sent: 03 May 2017 02:17 AM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment comment@noreply.github.com Subject: Re: [Terraspace/HJWasm] A2168 error (#50)

In case the linux problem is a reincarnation of the ymm10 problem, here is how I produced it:

Source code: https://www.dropbox.com/s/wh120h5mi00rv8u/hjwasm_problem.tar.gz?dl=0

Command line: hjwasm -DX86_64 -DARCH=FMA3 -EP -DWINDOWS64 -win64 yr4dwpn.asm

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/50#issuecomment-298803205 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVPhuxrxutFhZuFwqNRoLn8wTM0NIks5r19WLgaJpZM4NM0BN .

john-terraspace commented 7 years ago

Hi,

Ok it appears to be assembling perfectly now for me on OSX, Linux and Windows64 :

john@Nix:~/HJWasm/GccUnixR$ ./hjwasm -DX86_64 -DARCH=FMA3 -DWINDOWS64 -win64 ../gw3/yr4dwpn.asm

HJWasm v2.30, May 3 2017, Masm-compatible assembler.

Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.

Source code is available under the Sybase Open Watcom Public License.

../gw3/yr4dwpn.asm: 475 lines, 8 passes, 5785434 ms, 0 warnings, 0 errors

And

D:\gw3>c:\jwasm\hjwasm64 -win64 -DWINDOWS64 -DARCH=FMA3 -DX86_64 yr4dwpn.asm

HJWasm v2.30, May 3 2017, Masm-compatible assembler.

Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.

Source code is available under the Sybase Open Watcom Public License.

yr4dwpn.asm: 475 lines, 8 passes, 5083 ms, 0 warnings, 0 errors

D:\gw3>

And from nested paths in both.

Please try the latest 2.30 packages on the site and let me know how that goes.

John

From: gwoltman [mailto:notifications@github.com] Sent: 03 May 2017 02:17 AM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment comment@noreply.github.com Subject: Re: [Terraspace/HJWasm] A2168 error (#50)

In case the linux problem is a reincarnation of the ymm10 problem, here is how I produced it:

Source code: https://www.dropbox.com/s/wh120h5mi00rv8u/hjwasm_problem.tar.gz?dl=0

Command line: hjwasm -DX86_64 -DARCH=FMA3 -EP -DWINDOWS64 -win64 yr4dwpn.asm

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/50#issuecomment-298803205 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVPhuxrxutFhZuFwqNRoLn8wTM0NIks5r19WLgaJpZM4NM0BN .

gwoltman commented 7 years ago

On a 64-bit linux machine, it now works for me too. For grins, I set some defines to generate 6MB object files and that worked too.

I understand the difficulty in finding the 32-bit Windows problem when you cannot reproduce it. I'll manage. For 20 years, I've done the assembly in a 32-bit Windows environment. If it ain't broke, don't fix it. However, now may be the time to modernize my build procedures.

john-terraspace commented 7 years ago

Excellent, at least that’s ¾ :) OSX/Linux64/Windows64.

I’d really like to understand why there is an issue on 32bit Windows.. I don’t like unknowns floating around, just in case in may come back and bite us later on..

So from what you’ve mentioned, as long there are no errors it assembles fine in 32bit, so I can only assume that there must be some sort of memory/leak or corruption that is 32bit specific in the error logging or console output, at least that helps narrow down the search a bit.

From: gwoltman [mailto:notifications@github.com] Sent: 03 May 2017 05:32 PM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment comment@noreply.github.com Subject: Re: [Terraspace/HJWasm] A2168 error (#50)

On a 64-bit linux machine, it now works for me too. For grins, I set some defines to generate 6MB object files and that worked too.

I understand the difficulty in finding the 32-bit Windows problem when you cannot reproduce it. I'll manage. For 20 years, I've done the assembly in a 32-bit Windows environment. If it ain't broke, don't fix it. However, now may be the time to modernize my build procedures.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/50#issuecomment-298964595 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVN_IkRCKlSRDPhOh7nd3MFnPOaReks5r2KwBgaJpZM4NM0BN .

john-terraspace commented 7 years ago

Would you mind trying this version?

www.terraspace.co.uk/hjwasm32.zip http://www.terraspace.co.uk/hjwasm32.zip

Just experimenting to see it the memory leak might have something to do with fwrite to console as opposed to using fprintf and increasing the line buffer size.

From: gwoltman [mailto:notifications@github.com] Sent: 03 May 2017 05:32 PM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment comment@noreply.github.com Subject: Re: [Terraspace/HJWasm] A2168 error (#50)

On a 64-bit linux machine, it now works for me too. For grins, I set some defines to generate 6MB object files and that worked too.

I understand the difficulty in finding the 32-bit Windows problem when you cannot reproduce it. I'll manage. For 20 years, I've done the assembly in a 32-bit Windows environment. If it ain't broke, don't fix it. However, now may be the time to modernize my build procedures.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/50#issuecomment-298964595 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVN_IkRCKlSRDPhOh7nd3MFnPOaReks5r2KwBgaJpZM4NM0BN .

gwoltman commented 7 years ago

You understand correctly. Source code errors always crash if I request a listing. Source code errors have been known to crash even if I don't request a listing. Error free code has never had a problem.

Don't mind at all. No difference. Crashes if there are errors and I request a listing. (/Fl /Sf /Sa)

On Wed, May 3, 2017 at 2:24 PM, John Hankinson notifications@github.com wrote:

Would you mind trying this version?

john-terraspace commented 7 years ago

Can you try with just /Fl and not /Sf and /Sa ? (try to narrow it down to a specific part of the listing generation) perhaps.

From: gwoltman [mailto:notifications@github.com] Sent: 03 May 2017 09:44 PM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment comment@noreply.github.com Subject: Re: [Terraspace/HJWasm] A2168 error (#50)

You understand correctly. Source code errors always crash if I request a listing. Source code errors have been known to crash even if I don't request a listing. Error free code has never had a problem.

Don't mind at all. No difference. Crashes if there are errors and I request a listing. (/Fl /Sf /Sa)

On Wed, May 3, 2017 at 2:24 PM, John Hankinson notifications@github.com wrote:

Would you mind trying this version?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/50#issuecomment-299029653 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVEgASlhy6FB8L7-K_YHjIGpselNFks5r2OcWgaJpZM4NM0BN .

gwoltman commented 7 years ago

Crashes without /Sf and /Sa

Interestingly, during development of one of my smaller .asm files I introduced some bugs. Hjwasm did not crash assembling the smaller file even with /Fl /Sf /Sa.

Whatever the problem is, it is going to be extraordinarily difficult to find.

john-terraspace commented 7 years ago

Definitely is.. given I can’t even suggest you go back to older versions to see if the problem is long-standing or was introduced at some point because the code probably depends on features that weren’t in pre 2.14/2.15’ish. I will continue to investigate.

From: gwoltman [mailto:notifications@github.com] Sent: 04 May 2017 02:48 AM To: Terraspace/HJWasm HJWasm@noreply.github.com Cc: John Hankinson john@terraspace.co.uk; Comment comment@noreply.github.com Subject: Re: [Terraspace/HJWasm] A2168 error (#50)

Crashes without /Sf and /Sa

Interestingly, during development of one of my smaller .asm files I introduced some bugs. Hjwasm did not crash assembling the smaller file even with /Fl /Sf /Sa.

Whatever the problem is, it is going to be extraordinarily difficult to find.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Terraspace/HJWasm/issues/50#issuecomment-299080490 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQGQVPulxPGCQAo84Z7eNaC8hfLKwSHeks5r2S5UgaJpZM4NM0BN .

gwoltman commented 7 years ago

I've add no crash problems with 2.37 and later. I'll close issue and re-open a new one should I see crashes in the future.