Re: [fpc-pascal] Memory Leak's in XMLRead unit

2017-11-08 Thread African Wild Dog
2017-11-07 23:57 GMT-02:00 Michael Van Canneyt :

>
> The "memory leak" is the exception object: you are not catching the
> exception.
>
> Change your program to the below, and you'll see that it is not leaking
> memory in the XML routines itself.
>
> Michael.
>

In fact, protecting with Try..Except does not generate the leak. I will try
to reproduce this error again. I noticed this behavior in my FCGI APP: a
client was sending a mal-formed XML content and my app was generating the
leaks.

My environment: Linux Debian Stretch 64 bits - Lazarus 1.6.4 - fpc 3.0.2.

I'm quite impressed with the processing power of fastcgi fcl-web
applications: they consume little memory (less than 2 MB per instance) and
are very fast to process the requests.

Regards
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Memory Leak's in XMLRead unit

2017-11-08 Thread Michael Van Canneyt



On Wed, 8 Nov 2017, African Wild Dog wrote:


2017-11-07 23:57 GMT-02:00 Michael Van Canneyt :



The "memory leak" is the exception object: you are not catching the
exception.

Change your program to the below, and you'll see that it is not leaking
memory in the XML routines itself.

Michael.



In fact, protecting with Try..Except does not generate the leak.


That is because you catch the exception object.
If you enable line info, you see that the unreleased memory is the exception
object and its error message.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Memory Leak's in XMLRead unit

2017-11-08 Thread Marcos Douglas B. Santos
On Wed, Nov 8, 2017 at 10:52 AM, African Wild Dog
 wrote:
> 2017-11-07 23:57 GMT-02:00 Michael Van Canneyt :
>>
>> ...
>>
> My environment: Linux Debian Stretch 64 bits - Lazarus 1.6.4 - fpc 3.0.2.
>
> I'm quite impressed with the processing power of fastcgi fcl-web
> applications: they consume little memory (less than 2 MB per instance) and
> are very fast to process the requests.

It is fast even on Windows+IIS.  ;)

Best regards,
Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] -O2 internal compiler errors

2017-11-08 Thread Ryan Joseph
When I turn on -O2 I get a never ending stream of internal error 2009112601 
which I think is from various inlined operator overloads (didn’t do much 
testing though). Is this a bug or are they not compatible?

Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] -O2 internal compiler errors

2017-11-08 Thread Karoly Balogh (Charlie/SGR)
Hi,

On Wed, 8 Nov 2017, Ryan Joseph wrote:

> When I turn on -O2 I get a never ending stream of internal error
> 2009112601 which I think is from various inlined operator overloads
> (didn’t do much testing though). Is this a bug or are they not
> compatible?

Example code to trigger it please, if possible, also which CPU
architecture and OS?  An internal error is always a compiler bug which
we'd like to fix. If with nothing else, but with a more user readable
error message.

BTW, yes, it's possible that it has something to do with the inlining.
(More specifically, how the inlining interacts with some SIMD register
load/store, probably, but this is speculation.)

If you're using 3.0.2 you could also try if it still occurs with the
SVN trunk version.

Charlie___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] installing cross fpc in parallel to systems fpc

2017-11-08 Thread Marc Santhoff
Hi,

how does fpc and it's makefiles handle the case of installing a cross
compiler on a system having fpc installed?

The target path will differ and I can set that, but how is the config
file .fpc.cfg handled?
I'm a bit afraid to mess up the installation not because of fpc but
because I'm not really knowing what I'm doing. ;)

Additionally there seems to be no compiler switch for changing the
configuration file to use, only -n for ignoring it. Is ist possible to
name the .cfg on the command line or how would it be done better?

TIA,
Marc


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] -O2 internal compiler errors

2017-11-08 Thread Ryan Joseph
I’m was not able to replicate this right now outside of the project. There 
appears to be a vast multitude of errors some of which are fixed by removing 
“inline” and other which I don’t understand right now. When I have some more 
free time I’ll try again. Thanks.

> On Nov 8, 2017, at 11:13 PM, Karoly Balogh (Charlie/SGR) 
>  wrote:
> 
> Example code to trigger it please, if possible, also which CPU
> architecture and OS?  An internal error is always a compiler bug which
> we'd like to fix. If with nothing else, but with a more user readable
> error message.

Regards,
Ryan Joseph

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal