United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6502655 Check for error return from libthread calls.
JDK-6502655 : Check for error return from libthread calls.

Details
Type:
Bug
Submit Date:
2006-12-08
Status:
Closed
Updated Date:
2012-10-08
Project Name:
JDK
Resolved Date:
2007-04-24
Component:
hotspot
OS:
solaris
Sub-Component:
runtime
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
hs10 (b12)

Related Reports
Backport:
Backport:

Sub Tasks

Description
thr_main can return -1.

209 address os::current_stack_base() {
 210   bool is_primordial_thread = thr_main();
 211
 212   // Workaround 4352906, avoid calls to thr_stksegment by
 213   // thr_main after the first one (it looks like we trash
 214   // some data, causing the value for ss_sp to be incorrect).
 215   if (!is_primordial_thread || os::Solaris::_main_stack_base == NULL) {
 216     stack_t st = get_stack_info();
 217     if (is_primordial_thread) {
 218       // cache initial value of stack base
 219       os::Solaris::_main_stack_base = (address)st.ss_sp;
 220     }
 221     return (address)st.ss_sp;
 222   } else {
 223     guarantee(os::Solaris::_main_stack_base != NULL, "Attempt to use null cached stack base");
 224     return os::Solaris::_main_stack_base;
 225   }

                                    

Comments
EVALUATION

- The fixes for 6502655 guard against a cluster of Solaris
    kernel bugs where thread identity could become confused.
    Normally these would be fatal exits, but given that they guard
    only against a kernel bug - since fixed - I've intentionally opted
    to (ab)use guarantee() instead.
                                     
2007-04-24



Hardware and Software, Engineered to Work Together