[fpc-devel] Dynamic Arrays as Static class variables
Willibald Krenn
Willibald.Krenn at gmx.at
Tue Oct 5 00:00:19 CEST 2010
Hi,
I just tried and can reproduce this with fpc rev. 16078 on win64.
Running
{$mode objfpc}{$H+}
Type
TTest = class
FDynArr : Array of Integer; static;
End;
var
x : TTest;
begin
x := TTest.Create();
x.free;
end.
gives
Program received signal SIGSEGV, Segmentation fault.
fpc_dynarray_decr_ref (P=0x40d01800, TI=0x14afa90)
at C:/source/fpcsrc/rtl/inc/dynarr.inc:103
103 if realp^.refcount=0 then
(gdb) bt
#0 fpc_dynarray_decr_ref (P=0x40d01800, TI=0x14afa90)
at C:/source/fpcsrc/rtl/inc/dynarr.inc:103
#1 0x0000000000404b55 in fpc_finalize (DATA=0x16b9af, TYPEINFO=0x0)
at C:/source/fpcsrc/rtl/inc/rtti.inc:174
#2 0x0000000000000000 in ?? ()
(gdb)
Cheers,
Willi
More information about the fpc-devel
mailing list