27.11.2011 19:10, Sven Barth пишет:
On 27.11.2011 16:45, Sergei Gorelkin wrote:
The fact it works with DISABLE_TLS_DIRECTORY and fails otherwise
suggests that the foreign thread raises exceptions and FPC tries to
handle them. Error 255 is most likely caused by Halt(255) in
rtl/inc/except.inc line 200 or 303, these are the only places where RTL
can exit with code 255.
This is explainable: FPC won't have ExceptObjectStack or
ExceptAddressStack set up for the foreign thread, they will contain nil
values.
But I don't imagine how it manages to work *without* TLS callbacks. The
difference is that RTL will remain in single-threaded mode, but
SetUnhandledExceptionFilter that is used to intercept exceptions is
AFAIK global and will still break in.
Also interesting question: why does so far only Leonardo experience that
problem? I myself have no
problem building trunk on a Windows 7 machine using 2.4.4 as a starting
compiler.
He has some software which creates threads in compiler process. Maybe something specific to VM,
maybe something specific to server OS.
I also build trunk successfully on Windows XP (32bit) and Windows 7 (64bit), on both of them Process
Explorer shows just a single thread in compiler process.
Another point to look at is webtbs/tw2423.pp, testsuite shows it fails consistently with RTE 226,
while I have never seen it failing locally.
Sergei
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel