[fpc-devel] Misterious error

Sergei Gorelkin sergei_gorelkin at mail.ru
Wed Jan 4 15:12:55 CET 2012

04.01.2012 15:58, José Mejuto пишет:
> Hello FPC,
> Tuesday, January 3, 2012, 10:01:54 PM, you wrote:
>>> Do you know which kind of code I must look for to isolate the problem
>>> ?
> SG>  I'd suggest looking at the constructors containing an 'exit' statement,
> SG>  but I'm not entirely sure.
> SG>  Does restoring removed line 287 of psub.pas remove the segfault?
> SG>  (The line was:
> SG>     include(current_procinfo.flags,pi_needs_implicit_finally); )
> No, it does not :( The problem seems to happend in a destroy process,
> but as it only happends on close window, and in the close process a
> lot of objects and interfaces are destroyed I can not track each one
> :(
I was hoping otherwise... Actually it is very strange that reverting changes at line 700 (which you 
mentioned earlier) removes the crash, while reverting line 287 does not, because removing 
pi_needs_implicit_finally flag is the condition under which code at line 700 could ever execute.

> I'll try to create a minimun project that fails, it would need a
> firebird and zeoslib.
This is of course the best thing to do.

However, you can as well try the attached simple patch. It prevents temps referenced from 'finally' 
blocks from being placed to registers.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nflw.pas.patch
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20120104/732ddc7f/attachment.ksh>

More information about the fpc-devel mailing list