Menu

#3277 GBZ80 (and probably other) sdasgb crashes on macos

open
nobody
None
other
5
2022-02-02
2021-09-02
Tony Pavlov
No

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.

1 Attachments

Discussion

  • Tony Pavlov

    Tony Pavlov - 2021-09-02

    sorry for the typo. linux and WINDOWS builds compile that fine. MacOS version of sdas crashes.

     
  • bbbbbr

    bbbbbr - 2021-09-09

    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.

     
  • Philipp Klaus Krause

    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.

     
    • bbbbbr

      bbbbbr - 2021-09-23

      Thanks. Yes, it was a workaround as opposed to a fix. I wasn't sure whether truncation would be acceptable or cause unforeseen problems.

       
      • Sebastian Riedel

        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.

         
        • bbbbbr

          bbbbbr - 2022-02-02

          Thank you!

           

Log in to post a comment.

MongoDB Logo MongoDB