[fpc-pascal] heaptrc under linux points to the wrong line
Luca Olivetti
luca at ventoso.org
Mon Aug 28 16:50:41 CEST 2023
Hello,
as per the subject, with heaptrc enabled, output to a file and using the
"view leaks and traces" feature of lazarus, I see several leaks, always
on the same line.
However, under linux 64 bits, the line it points to is not where the
leak is created.
Linux was reporting the leak in this function
function TSseResponse.Send(const command:TDisplayCommand):boolean;
const eventstring='event:';
datastring='data:';
var
cmd: TSseCommand;
begin
if command=nil then
begin
cmd.event:='';
cmd.data:='';
end else
cmd:=command.GetCommand; <--- here
TSseCommand is declared as
TSseCommand = record
event,data:string;
end;
I compile the same project under windows (32 bits) and there I see the
real location of the leak: inside the "GetCommand" method of one of the
classes derived from TDisplayCommand.
Fpc 3.2.2, lazarus 2.2.6, debug info automatic (-g) and using the
external debug symbols file (-Xg).
Bye
--
Luca
More information about the fpc-pascal
mailing list