10.03.2014 19:40, Jonas Maebe пишет:

On 10 Mar 2014, at 16:13, Petr Kristan wrote:

If memoryleak occurs and program ends, then i get SIGSEGV in cwstring.pp:481 
(iconv call)
because cwstring unit is finalized before heaptrc.


If you use -gh, then heaptrc will be the first unit of the uses clause and will 
be finalized after
any manually added unit.

That's exactly the issue. Being finalized last, heaptrc must not do anything that depends on functionality from other units, except system, but it does due to recent Unicode-related changes (indirectly, see the stack trace).

Even further, in case of error RTL tries to print a backtrace right after finalizing all units (see InternalExit procedure in system.inc), which can lead to similar problems.

Regards,
Sergei
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to