[fpc-devel] Heap trace failure on AArch64

J. Gareth Moreton gareth at moreton-family.com
Sat Apr 24 20:09:53 CEST 2021

Hi everyone,

I've been trying to develop some new peephole optimisations for AArch64, but have been stuck with 10 
additional failures in the test suite.  After failing to iron them out, the common denominator seem 
to be test that involve heap traces.

Well, it turns out that building the trunk (without my modifications) with the -gh option causes it 
to fail fairly early on, and I'm starting to wonder if my current work is simply exposing this issue 
more often.

I'm still learning to interpret heap traces, so I'm not quite sure where to begin with this - any 
help would be appreciated.

In other news, I won't have my laptop back until at least May 3rd, and there's no guarantee that 
I'll still have all my data.  Current analysis suggests that something related to power has failed 
on the motherboard, while the underside shows a lot of cracking - since I can't think of any 
sustained impacts, it was suggested that another cause was the plastic turning brittle from heat 
damage.  Guess I need to find new cooling solutions for it when it's running at full power!

Gareth aka. Kit

(Sample of build log from: make clean all OPT="-al -O4 -glth -CriotR" > build.log 2>&1)

/bin/rm -f ppc1
/bin/mv -f ppca64 ppc1
make 'FPC=/home/pi/Documents/source/fpc/compiler/ppc1' 'OLDFPC=' next CYCLELEVEL=2
make[4]: Entering directory '/home/pi/Documents/source/fpc/compiler'
Marked memory at $0000007FAA3D7B40 invalid
Wrong signature $75948F4B instead of 32A24524
  $00000000004332F8  TRACEFREEMEMSIZE,  line 773 of ../inc/heaptrc.pp
  $0000000000433424  TRACEFREEMEM,  line 813 of ../inc/heaptrc.pp
  $0000000000421E5C  FREEMEM,  line 326 of ../inc/heap.inc
  $00000000004CD39C  DESTROY,  line 190 of symbase.pas
  $00000000004E2718  DESTROY,  line 608 of symtype.pas
  $0000000000418E5C  FREE,  line 336 of ../inc/objpas.inc
  $000000000059FA80  DONESYMTABLE,  line 4873 of symtable.pas
  $000000000043EC0C  DONECOMPILER,  line 189 of compiler.pas
  $000000000043F3A8  COMPILE,  line 316 of compiler.pas
  $00000000004005C8  main,  line 301 of pp.pas
Heap dump by heaptrc unit of "/home/pi/Documents/source/fpc/compiler/ppc1"
13510 memory blocks allocated : 1481215/1481744
13424 memory blocks freed     : 1463595/1464000
86 unfreed memory blocks : 17620
True heap size : 557056
True free heap : 520256
Should be : 522800

More information about the fpc-devel mailing list