Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2013-03

fpc 2.6.2 - heaptrc and dwarf will crash

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin

It seems that in FPC 2.6.2 the dwarf reading code in LnfoDwrf is broken. It always gives a run-error 131

compiled below example with
-MObjFPC -Scghi -O1 -gw2 -gl -gh -vewnhi

and boom

program Project1;
{$mode objfpc}{$H+}
begin
   TObject.Create;
end.

it prints

Heap dump by heaptrc unit
1 memory blocks allocated : 4/8
0 memory blocks freed : 0/0
1 unfreed memory blocks : 4
True heap size : 98304 (112 used in System startup) True free heap : 98112
Should be : 98120
Call trace for block $00087458 size 4
$00401427 line 6 of project1.lpr

and then 131 is risen

Reply by email

Bruce Tulloch
to Ludo Brands

It appears heaprc has another problem; if the RTL (and therefore heaprc) is compiled with OVERFLOWCHECKS enabled (i.e. -Co) it blows up when the aggregate of memory allocations made by a thread exceeds 4GB (the size of 32 bit allocation variables, e.g. getmem8_size).

Does this perhaps suggest that this file should specify {$PUSH}{$Q-}...{$POP} at the appropriate places to avoid this problem? Otherwise, a program with the heap tracer enabled running with an RTL built with this check enabled will throw an overflow exception eventually.

-b

Ludo Brands wrote 14 lines
On 03/17/2013 08:53 PM, Martin wrote: > It seems that in FPC 2.6.2 the dwarf reading code in LnfoDwrf is broken. > It always gives a run-error 131 > Reported and cause identified more than a year ago: http://bugs.freepascal.org/view.php?id=20296 Ludo _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email