This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Fix wrong assertion in tasking run-time


Tested on i686-linux, committed on trunk

When abort is not allowed, GNAT takes advantage to generate simpler and
more efficient code, and we must reset the deferral level by hand before
calling the user's code. However, it was done a bit too early since there
are calls (for example to Enter_Task) that assume that abort is deferred.
Hence, some run-time assertions were violated. The code for resetting the
deferral level, if needed, has been moved to a later stage, just before
calling the user's code.
Compiling any trivial tasking test with a run-time built with assertions
would trigger an assert_failure (and now run properly).

2005-11-14  Jose Ruiz  <ruiz@adacore.com>

	* s-tassta.adb (Create_Task): Move the code in charge of resetting the
	deferral level, when abort is not allowed, to a later stage (the
	Task_Wrapper).
	(Task_Wrapper): If Abort is not allowed, reset the deferral level since
	it will not get changed by the generated code. It was previously done
	in Create_Task.

Attachment: difs.12
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]