2010/10/26 Tobias Giesen :
> 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 per se. I
suspect a subtle
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
`/home/me/Programs/fpc/fpsrc/
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@lists.
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
__
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
http://li
Hi,
the latest 2.5.1 SVN leaks too (on Mac i386). Will try to isolate it.
Cheers,
Tobias
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 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
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.
Jonas_
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
> 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 SV
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 Wi
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 l
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
__
OK, thanks. I just want to know why such a thing cannot be detected at
compile time. So, a good typing practice is the solution, right? Like this:
program test;
type
TArrayRange = 1..3;
TArray = array[TArrayRange] of Integer;
var
a: TArray;
i: TArrayRange;
begin
for i := 1 to 4 do
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
__
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 - fpc-pasc
On 25 Oct 2010, at 13:54, Jonas Maebe wrote:
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
e
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 thoug
25.10.2010 16:06, leledumbo wrote:
Consider the following program:
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 there's an
out of bounds array index when i = 4.
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 t
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
compi
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.
Any
Consider the following program:
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 there's an
out of bounds array index when i = 4.
Since the behavior of for loop in FPC
23 matches
Mail list logo