Menu

#3281 GBZ80 SDCC segfault

closed-out-of-date
None
other
5
2025-08-07
2021-09-14
Tony Pavlov
No

version:

SDCC : mcs51/z80/z180/r2k/r2ka/r3ka/gbz80/tlcs90/ez80_z80/z80n/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15 4.1.10 #12674 (MINGW64)

output:

"c:\gb\development\GBStudio\gbdk\"bin/sdcc -mgbz80 --no-std-crt0 --fsigned-char --use-stdout -D__PORT_gbz80 -D__TARGET_gb -Wa-pogn -I"c:\gb\development\GBStudio\gbdk\"lib/small/asxxxx/gb -DGB=1 -DINT_16_BITS -D__LCC__ -I../../include -Idata/include -DSGB -DHUGE_TRACKER -I"c:\gb\development\GBStudio\gbdk\"include -c ../../src/core/trigger.c -o ../../obj/trigger.o
../../src/core/trigger.c:82: error 9: FATAL Compiler Internal Error in file '/home/sdcc-builder/build/sdcc-build/orig/sdcc/src/z80/gen.c' line number '5456' : code generator internal error
Contact Author with source code
Caught signal 11: SIGSEGV

source:
https://github.com/chrismaltby/gbvm/blob/master/src/core/trigger.c#L82

line 82 is a "return FALSE;" of trigger_activate_at_intersection() banked function.

Related

Wiki: NGI0-Commons-SDCC

Discussion

  • Philipp Klaus Krause

    Looks like the recent calling convention switch introduced a bug in the handling of banked functions.

     
  • Philipp Klaus Krause

    Is there a chance to get a smaller reproducing example? Preferably just one function definition, and no dependencies on headers (other than the standard library that comes with SDCC)?

     
  • Tony Pavlov

    Tony Pavlov - 2021-09-20

    i'll try to, Philipp

     
  • Philipp Klaus Krause

    • status: open --> closed-out-of-date
    • assigned_to: Philipp Klaus Krause
     
  • Philipp Klaus Krause

    Can't check if this still affects current SDCC, since we do not have a self-contained code sample to reproduce the issue.

     
    • Tony Pavlov

      Tony Pavlov - 2025-08-07

      it does not, it is ok to close this issue.

       

Log in to post a comment.

MongoDB Logo MongoDB