Yes TRon, well summed up.
I have confirmed, even with a March 2024 FPC-Fixes, no line numbers. (Intel based Monterey).
To be quite clear, on Mac, heaptrc is useful to tell you you have a leak, but does not tell you where. Lets not go off chasing this particular wild goose again.
This is almost certainly a bug in the FPC / heaptce tool chain, I totally reject Thaddy's suggestion that we have discovered a flaw in Unix ! (I think he must have been joking...)
JdeHaan, if you can get your code to compile on Linux (or even Windows) debug there. VirtualBox perhaps ? Otherwise, it might be a case of gradually commenting out sections of code until the leak goes away (or reduces), messy indeed. My 25K line project does not have any leaks, obviously I don't use all of LCL but some of it, so as a starting point, assume the leaks are in your own code. Sorry
I do all my development on Linux, its so much easy to debug there. (Join us, do not be afraid....)
Davo