[fpc-pascal] Heaptrc with symbolic stack trace or map file on Mac OS X ?

2010-10-25 Thread Tobias Giesen
Hello, I'm trying to find a memory leak but I am unable to get a symbolic stack trace from the heaptrc dump. Also the option -Xm does not generate a map file on Mac OS X. Or at least I don't see it. If I could get a detailed map file with line numbers and offsets, I would probably be happy.

Re: [fpc-pascal] Heaptrc with symbolic stack trace or map file on Mac OS X ?

2010-10-25 Thread Jonas Maebe
On 25 Oct 2010, at 11:33, Tobias Giesen wrote: I'm trying to find a memory leak but I am unable to get a symbolic stack trace from the heaptrc dump. Automatically symbolicating stack traces is currently only supported when using Stabs debug information on Mac OS X (make sure to also

Re: [fpc-pascal] Range checking in a for loop

2010-10-25 Thread David W Noon
On Mon, 25 Oct 2010 01:06:16 -0700 (PDT), leledumbo wrote about [fpc-pascal] Range checking in a for loop: [snip] program test; var a: array [1..3] of Integer; i: Integer; begin for i := 1 to 4 do a[i] := i; end. The compiler will accept this code happily, despite the fact that

Re: [fpc-pascal] Range checking in a for loop

2010-10-25 Thread Jonas Maebe
On 25 Oct 2010, at 13:24, David W Noon wrote: Try declaring i : 1..3; instead, as that range matches the array's bounds. You should then get a range check at compile time. With current released versions, you won't get such a compile time error. I fixed that just yesterday in svn

[fpc-pascal] Widestring memory leaks with FPC 2.4.0?

2010-10-25 Thread Tobias Giesen
Hello, I'm using FPC 2.4.0 on Mac and I have a problem with WideString memory leaks. Is there any known issue, such that temporary WideStrings are not always freed, or any bug in reference counting? Cheers, Tobias ___ fpc-pascal maillist -

Re: [fpc-pascal] Widestring memory leaks with FPC 2.4.0?

2010-10-25 Thread Jonas Maebe
On 25 Oct 2010, at 14:53, Tobias Giesen wrote: I'm using FPC 2.4.0 on Mac and I have a problem with WideString memory leaks. Is there any known issue, such that temporary WideStrings are not always freed, or any bug in reference counting? No. Jonas

Re: [fpc-pascal] Widestring memory leaks with FPC 2.4.0?

2010-10-25 Thread Tobias Giesen
Hi, I am doing a regular heaptrc.DumpHeap now and I see that WideString memory blocks are still allocated for string values which are no longer in use. Is the memory freed in some lazy way? Or should a value that is no longer assigned to any WideString be freed immediately? Cheers, Tobias

[fpc-pascal] TPLY

2010-10-25 Thread Brian Winfrey
I recently saw a semi working example of a Java to Delphi converter that was done with javacc. Unfortunately it would only convert simple java (v 1.4 maybe). Can anyone recommend a good place to start reading or offer any advise to accomplish this with TPLY. I am looking into porting some Java

Re: [fpc-pascal] Widestring memory leaks with FPC 2.4.0?

2010-10-25 Thread Jonas Maebe
On 25 Oct 2010, at 19:08, Tobias Giesen wrote: I am doing a regular heaptrc.DumpHeap now and I see that WideString memory blocks are still allocated for string values which are no longer in use. Is the memory freed in some lazy way? Or should a value that is no longer assigned to any

Re: [fpc-pascal] Widestring memory leaks with FPC 2.4.0?

2010-10-25 Thread Tobias Giesen
Unless heaptrc shows leaks when the program exits, no memory leaks happen. It's a leak. The program loses hundreds of MBs of memory just by working with WideStrings. I compared it against FPC 2.2.4 - no leak. An SVN snapshot of 2.5.1 from around 3 months ago also leaks. Will update from SVN

Re: [fpc-pascal] Widestring memory leaks with FPC 2.4.0?

2010-10-25 Thread Marco van de Voort
In our previous episode, Tobias Giesen said: Unless heaptrc shows leaks when the program exits, no memory leaks happen. It's a leak. The program loses hundreds of MBs of memory just by working with WideStrings. I compared it against FPC 2.2.4 - no leak. An SVN snapshot of 2.5.1 from

Re: [fpc-pascal] Widestring memory leaks with FPC 2.4.0?

2010-10-25 Thread Jonas Maebe
On 25 Oct 2010, at 20:35, Tobias Giesen wrote: It's a leak. The program loses hundreds of MBs of memory just by working with WideStrings. I compared it against FPC 2.2.4 - no leak. Then you'll have to provide a compilable example that demonstrates the problem so we can fix it.

Re: [fpc-pascal] Widestring memory leaks with FPC 2.4.0?

2010-10-25 Thread Tobias Giesen
Then you'll have to provide a compilable example that demonstrates the problem so we can fix it. I will try! Cheers, Tobias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

[fpc-pascal] Widestring Questions

2010-10-25 Thread Tobias Giesen
Hi, is it possible to turn off reference counting, for a test? Is there a difference between UnicodeString and WideString on the Mac version (i386) of FPC 2.4 / 2.5? Cheers, Tobias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Widestring Questions

2010-10-25 Thread Jonas Maebe
On 25 Oct 2010, at 23:25, Tobias Giesen wrote: is it possible to turn off reference counting, for a test? No. Is there a difference between UnicodeString and WideString on the Mac version (i386) of FPC 2.4 / 2.5? No. UnicodeString and WideString only differ on Windows. Jonas

Re: [fpc-pascal] Widestring Questions

2010-10-25 Thread Tobias Giesen
Hi, I think the problem might be that Widestring reference counting is not thread safe. But it worked fine in FPC 2.2. I will add some UniqueString calls and also try to isolate the issue. Cheers, Tobias ___ fpc-pascal maillist -

[fpc-pascal] Cross-compiling with FPC 2.5.1

2010-10-25 Thread patspiper
I use the scripts buildcrossbinutils.sh and buildcrosssnapshot.sh to buils the FPC 2.4.2 cross compiler (linux to win32). However when I do the same steps but with FPC 2.5.1, I get the following error: make all LINKSMART=1 CREATESMART=1 make[4]: Entering directory

Re: [fpc-pascal] Widestring Questions

2010-10-25 Thread Honza
2010/10/26 Tobias Giesen tobias_subscri...@tgtools.com: I think the problem might be that Widestring reference counting is not thread safe. But it worked fine in FPC 2.2. A bug may show anytime anywhere, but the built in ref counted string types are AFAIK thread safe what concerns the ref count