Menu

#2759 z80: SDCC uses over 100GB of ram

closed-fixed
None
other
5
2018-06-12
2018-06-11
No

Seeing 2755 being fixed, i decided to update sdcc and do another build of FUZIX, just to find another memory issue.

$ git clone https://github.com/EtchedPixels/FUZIX.git
$ cd FUZIX/Library/libs
$ sdcc --nogcse -c -mz80 scalbnf.c
...
ERROR - No more memory

$ sdcc -v
SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.7.1 #10431 (Linux) published under GNU General Public License (GPL)

As you can see, i already tried --nogcse from 2755, but that didn't help.
This box has 16GB of ram and 128GB of swap.

Attached is the reproducer in case you don't want to download the entire tree.

1 Attachments

Discussion

  • Erik Petrich

    Erik Petrich - 2018-06-11
    • status: open --> closed-fixed
    • assigned_to: Erik Petrich
     
  • Erik Petrich

    Erik Petrich - 2018-06-11

    Fixed in [r10434]. Memory to compile this is now just under 7 MB.

    Thanks for finding and reporting this; this was a side-effect of my efforts to be more frugal with memory. One bit vector now had a smaller allocation than another one, causing them to be considered unequal, even though they had the same bits set, which in turn cause the data flow analysis to get stuck in an infinite loop (with additional memory allocated in each iteration).

     
  • Philipp Klaus Krause

    You might want to check if bug [#2686] or [#2555] is a duplicate of this one.

    Philipp

     

    Related

    Bugs: #2555
    Bugs: #2686


    Last edit: Maarten Brock 2018-10-13

Log in to post a comment.

Auth0 Logo