[Bug ada/19526] Windows errorcodes wrong in Ada when tasking

charlet at adacore dot com gcc-bugzilla@gcc.gnu.org
Sat Mar 19 13:55:00 GMT 2005


------- Additional Comments From charlet at adacore dot com  2005-03-19 13:54 -------
Subject: Re:  Windows errorcodes wrong in Ada when tasking

> IMO, resetting the error code set by the kernel whenever the internal Ada
> tasking functions are called successfully is a bug.

So you are saying that there is a bug in the Windows kernel ?
Since the Ada run time does not do any reset of the error code.

> It can be easily fixed:

I don't see how this fixes things, since TlsGetValue is also called
in the Self function.

Is_Valid_Task is not called in the test case at hand, and Set is called
during task elaboration, so that's also not problematic.

Did you get a "successful"run of the application with this patch ?
If so, it probably means that the problem is elsewhere and that this
patch is just hiding it.

The function which is called when you use tasking constructs is
Self, and this function is time critical, so it is simply out of the
question to call GetLastError/SetLastError there.

If you want to know the error code associated with your socket call,
you should save the result right away, and not delay this operation.

Arno


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19526



More information about the Gcc-bugs mailing list