Sign in Join

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

Mailing lists / fpc-pascal / 2007-11

Heaptrace and generics

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

bartek

Hi,

I am playing with generics around. I have implemented two simple Lists. A array based TList and a double linked TLinkedList. I have also written a test program to test these.
Here comes the interesting part. The test program runs flawlessy, but compiled with -gh for heaptrace or -gv for valgrind, the test program crashes always at a certain point.
I thought that it was possible that I did some horrendous things with my memory, but running "valgrind --tool=memcheck" on a clean (read no -gh or -gv) executable results in absolutely no problems reported by valgrind. Could be FPC at fault? Both files are attached, "DataContainers.pp" being the two lists and "DataContainers_Test.pp" the test program.

FPC 2.2.0 on Linux 2.6.23
valgrind-3.2.3

thanks in advance
bartek

bartek

Resending, seems like my last mail did not reach the list. :|

Hi,

I am playing around with generics. I have implemented two simple Lists. A array based TList and a double linked TLinkedList. I have also written a test program to test these.
Here comes the interesting part. The test program runs flawlessy, but compiled with -gh for heaptrace or -gv for valgrind, the test program crashes always at a certain point.
I thought that it was possible that I did some horrendous things with my memory, but running "valgrind --tool=memcheck" on a clean (read no -gh or -gv) executable results in absolutely no problems reported by valgrind. Could be FPC at fault? Both files are attached, "DataContainers.pp" being the two lists and "DataContainers_Test.pp" the test program.

FPC 2.2.0 on Linux 2.6.23
valgrind-3.2.3

thanks in advance
bartek

Micha Nelissen
to bartek
bartek wrote 5 lines
Could be FPC at fault? Both files are attached, "DataContainers.pp" being the two lists and "DataContainers_Test.pp" the test program. FPC 2.2.0 on Linux 2.6.23 valgrind-3.2.3

Can you retest with fpc 2.3.1 ? There have been some heaptrace fixes. Otherwise, please post a bug report with the code, so it won't be forgotten.

Micha

bartek
to Micha Nelissen
Micha Nelissen wrote 8 lines
bartek wrote: > Could be FPC at fault? Both files are attached, "DataContainers.pp" being > the two lists and "DataContainers_Test.pp" the test program. > > FPC 2.2.0 on Linux 2.6.23 > valgrind-3.2.3 Can you retest with fpc 2.3.1 ? There have been some heaptrace fixes.

Tested with revision 9263. Crashes with -gh and -gv.

Otherwise, please post a bug report with the code, so it won't be forgotten.

I wanted to make sure my code was not at fault, before submitting a bug report ;)
Submitted as 0010186.

Show quoted text 5 lines
Micha _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal