Patch 200802141-1 - Rational Apex Embedded (VxWorks/Tornado) 4.0 for Sun Solaris->PowerPC ----------------------------------------------------------- To install this patch, download these 3 files and run the install script: install_sol_200802141_1 sol.patch.200802141-1.inventory sol.patch.200802141-1.tar.Z Description REQUIRED PATCH SERIES IDs: Starting with Apex 4.0.0, most Native and Embedded patches have a SeriesID associated with them. Specifying a SeriesID as a prerequisite for installation as opposed to a PatchID prevents prerequisites from becoming obsolete as new patches are created. SeriesIDs are text strings -- eg runtimes, views, etc -- and are listed next to the PatchIDs at ftp://ftp.rational.com/patch_info/index.html Before installing this patch, you must install a patch from the following product-series: Apex Native: series sun4_solaris2 [patchID 20010710 or later]. ---------------------------------------------------------- It is suggested that all users install this patch. ---------------------------------------------------------- This patch fixes the following: Defect RATLC00151149: Programs created by Rational Ada Embedded Developer 4.0.0 for VxWorks PowerPC can fail to process exceptions correctly in large procedures. This problem was addressed in Rational Ada Embedded Developer 4.2.0; this patch provides a backport of that fix. ---------------------------------------------------------- The following were fixed in earlier patches. The fixes are included in this patch as well. Defect PEBU00007209: The creation of an Ada task by the Apex runtime involves the allocation of several resources. One of these, the Ada Task Control Block (ATCB) is used by the runtime to keep track of the state of the task, and as such must exist while the task is still visible, even after it has been terminated. The ATCB is used, for example, to supply the value of the 'Terminated attribute. Because of this, Apex does not deallocate the ATCB until the corresponding master completes. In particular, Unchecked_Deallocation of tasks created dynamically using Ada allocators will not deallocate the ATCB; it will not be deallocated until and unless the corresponding access type's master completes. For library level access types, this will not happen until program completion. This can cause applications using Unchecked_Deallocation on objects containing tasks to leak memory. This patch provides an implementation of Unchecked_Deallocation that will deallocated the ATCB of a terminated task. Note that the task has to be terminated at the time of the deallocation; if not, the ATCB will not be deallocated when the task terminates, but when the master completes, as before. Defect PEBU00007388: A coding error in translating the TestMate coverage harness to Ada95 prevented reading of the events information. This patch supplies a corrected harness archive. This affects TestMate users only. Defect PEBU00007427: In the Rational Apex 4.0 Embedded Solaris to PowerPC products, for loops may fail to terminate in certain situations. Bcopy, a subprogram internal to the runtime, does not preserve the value of the CTR register, which is used in optimized for loops. Calls to Bcopy are generated by the compiler to copy large objects, e.g. for record or array assignment. If one of these calls is made in the body of an optimized for loop, it may zero CTR, which prevents the loop from terminating. This patch provides a new Power PC code generator that recognizes the volatility of CTR, avoiding its use to implement loops containing subprogram calls that may modify it. Since the libraries in the released product were compiled with the original code generator, a version of Bcopy that preserves the value of CTR is also included. Defect PEBU00007660: In Apex 4.0.0, 64 bit integer division incorrectly raises Constraint_Error for arguments less than or equal to (-2**31)*(2**32). This occurs when the division routine attempts to convert this to a positive number prior to performing the actual division. This involves negating the upper 32 bits, -2**31; since 2**31 cannot be represented as an integer, overflow is detected and Constraint_Error is raised. This has been fixed by using 32 bit modular types to hold the result of the negation. Since 32 bit modular types can represent 2**31, no overflow occurs. Apex uses 64 bit integer types to represent Time and Time_Span values, so this change affects arithmetic on these types. Defect PEBU00007673: The Apex runtime now handles modular addition for modulus values greater than integer'last. Defect PEBU00009018: This patch provides a runtime system that simulates a 'time stop' during debugger breakpoints. This is done by recording the vxWorks time (tickGet()) at the beginning of the breakpoint and resetting the vxWorks system time to this saved value (tickSet()) when the program is continued. Note that this will cause all programs running under vxWorks to perceive a change to an earlier time, so it is not compatible with programs (other than the one being debugged) which assume that time always progresses. Defect PEBU00009131: The profiling runtime was allocating too much memory when allocating the count array. It was allocating the same number of bytes for the arrays as there are bytes in the Text (code) section of the program. Instead, the number of bytes allocated should depend upon the number of bytes per count and the size of each count: Size_Of_Array_In_Bytes = (Text_Size / PROFILE_BYTES_PER_COUNT) defect.RATLC00151149 desc.auto desc.bak desc.files desc.notes patch_data Count_Size Count_Size is 2 for the current implementation, and the default of PROFILE_BYTES_PER_COUNT is 8. So, by default, we should allocate 1/4 the number of bytes there are in the Text section. This patch fixes that error. ---------------------------------------------------------- It is suggested that all users install this patch.