mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 17:47:56 +02:00
+ patch by Bart B: TBucketList threw access violations after Clear, resolves #39565
+ test
This commit is contained in:
parent
bcab6185b9
commit
9ad2bdcecd
@ -2579,6 +2579,7 @@ end;
|
||||
destructor TCustomBucketList.Destroy;
|
||||
begin
|
||||
Clear;
|
||||
SetLength(FBuckets,0);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
@ -2593,7 +2594,6 @@ begin
|
||||
for J:=B.Count-1 downto 0 do
|
||||
DeleteItem(I,J);
|
||||
end;
|
||||
SetLength(FBuckets,0);
|
||||
end;
|
||||
|
||||
Function TCustomBucketList.Add(AItem, AData: Pointer): Pointer;
|
||||
|
@ -2486,7 +2486,7 @@ export LOG:=$(TEST_OUTPUTDIR)/log
|
||||
endif
|
||||
LOGFILES=$(TEST_OUTPUTDIR)/log $(TEST_OUTPUTDIR)/longlog $(TEST_OUTPUTDIR)/faillist
|
||||
LOGEXT=.testlog .tbslog .tbflog .webtbslog .webtbflog
|
||||
TESTUNITDIRS=system dos crt objects strings sysutils math sharemem strutils matrix lineinfo ucomplex fpwidestring cpu fmtbcd windows classes character dateutil fpcunit softfpu variants sortbase sortalgs linux unixutil types nullable
|
||||
TESTUNITDIRS=system dos crt objects strings sysutils math sharemem strutils matrix lineinfo ucomplex fpwidestring cpu fmtbcd windows classes character dateutil fpcunit softfpu variants sortbase sortalgs linux unixutil types nullable contnrs
|
||||
TESTDIRECTDIRS=
|
||||
TESTSUBDIRS=cg cg/variants cg/cdecl cpu16 cpu16/i8086 library opt $(addprefix units/,$(TESTUNITDIRS))
|
||||
TESTPACKAGESDIRS=win-base webtbs hash fcl-registry fcl-process zlib fcl-db fcl-xml cocoaint bzip2 fcl-net
|
||||
|
@ -159,7 +159,7 @@ LOGFILES=$(TEST_OUTPUTDIR)/log $(TEST_OUTPUTDIR)/longlog $(TEST_OUTPUTDIR)/faill
|
||||
LOGEXT=.testlog .tbslog .tbflog .webtbslog .webtbflog
|
||||
|
||||
# Subdirs available in the test subdir
|
||||
TESTUNITDIRS=system dos crt objects strings sysutils math sharemem strutils matrix lineinfo ucomplex fpwidestring cpu fmtbcd windows classes character dateutil fpcunit softfpu variants sortbase sortalgs linux unixutil types nullable
|
||||
TESTUNITDIRS=system dos crt objects strings sysutils math sharemem strutils matrix lineinfo ucomplex fpwidestring cpu fmtbcd windows classes character dateutil fpcunit softfpu variants sortbase sortalgs linux unixutil types nullable contnrs
|
||||
TESTDIRECTDIRS=
|
||||
TESTSUBDIRS=cg cg/variants cg/cdecl cpu16 cpu16/i8086 library opt $(addprefix units/,$(TESTUNITDIRS))
|
||||
TESTPACKAGESDIRS=win-base webtbs hash fcl-registry fcl-process zlib fcl-db fcl-xml cocoaint bzip2 fcl-net
|
||||
|
8
tests/test/units/contnrs/tbucketlist.pp
Normal file
8
tests/test/units/contnrs/tbucketlist.pp
Normal file
@ -0,0 +1,8 @@
|
||||
program Project1;
|
||||
uses contnrs;
|
||||
var b:TBucketList;
|
||||
begin
|
||||
b:=TBucketList.Create();
|
||||
b.Clear();
|
||||
b.Add(nil,nil);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user