input file: attached to the ticket.
command line:
../../../bin/sdasgb -pogn -I../../../lib/small/asxxxx/gb test.o mac_broken.asm
output:
~/P/g/e/g/bgb_debug ❯❯❯ ../../../bin/sdasgb -pogn -I../../../lib/small/asxxxx/gb test.o mac_broken.asm
fish: Job 1, '../../../bin/sdasgb -pogn -I../…' terminated by signal SIGABRT (Abort)
if you shorten the length of the parameter of a macro a bit, it will compile. linux and mac builds compile that fine.
sorry for the typo. linux and WINDOWS builds compile that fine. MacOS version of sdas crashes.
Looks like it crashes when macro length is greater than 80 characters and exceeds array size (controlled by the constant NCPS).
Increasing the value used for NCPS in sdas/asxxsrc/asxxxx.h removes the crash for macOS. Attached is a patch which increases it to 255.
Having a quick look at the code, I think the macro name is supposed to be truncated, but it should still work. Increasing NCPS seems more like a workaround than a fix to me.
Thanks. Yes, it was a workaround as opposed to a fix. I wasn't sure whether truncation would be acceptable or cause unforeseen problems.
I added this workaround in [r12966], since upstream ASXXXX itself uses 256 I think we should use that value too.
I keep this open since the underlying issue should be fixed, too.
Thank you!