# HG changeset patch # User coleenp # Date 1290228366 18000 # Node ID a6b067997c7ee2db75f04a9f5e1b5476d7eefe64 # Parent 0b33f0736406ce797bbe397a9c9d28e3eb5e2eba# Parent 4110c3e0c50dcea1b6a40cca8caef78907eed10b Merge diff -r 4110c3e0c50d -r a6b067997c7e src/os/solaris/vm/os_solaris.cpp --- a/src/os/solaris/vm/os_solaris.cpp Fri Nov 19 17:01:34 2010 -0800 +++ b/src/os/solaris/vm/os_solaris.cpp Fri Nov 19 23:46:06 2010 -0500 @@ -3375,7 +3375,12 @@ // INTERRUPTIBLE_NORESTART_VM_ALWAYS returns res == OS_INTRPT for // thread.Interrupt. - if((res == OS_ERR) && (errno == EINTR)) { + // See c/r 6751923. Poll can return 0 before time + // has elapsed if time is set via clock_settime (as NTP does). + // res == 0 if poll timed out (see man poll RETURN VALUES) + // using the logic below checks that we really did + // sleep at least "millis" if not we'll sleep again. + if( ( res == 0 ) || ((res == OS_ERR) && (errno == EINTR))) { newtime = getTimeMillis(); assert(newtime >= prevtime, "time moving backwards"); /* Doing prevtime and newtime in microseconds doesn't help precision, diff -r 4110c3e0c50d -r a6b067997c7e src/os/windows/vm/perfMemory_windows.cpp --- a/src/os/windows/vm/perfMemory_windows.cpp Fri Nov 19 17:01:34 2010 -0800 +++ b/src/os/windows/vm/perfMemory_windows.cpp Fri Nov 19 23:46:06 2010 -0500 @@ -889,6 +889,7 @@ DWORD newACLsize = aclinfo.AclBytesInUse + (sizeof(ACCESS_ALLOWED_ACE) - sizeof(DWORD)) * ace_count; for (int i = 0; i < ace_count; i++) { + assert(aces[i].pSid != 0, "pSid should not be 0"); newACLsize += GetLengthSid(aces[i].pSid); } @@ -1084,6 +1085,9 @@ aces[0].pSid = get_user_sid(GetCurrentProcess()); aces[0].mask = umask; + if (aces[0].pSid == 0) + return NULL; + // get the well known SID for BUILTIN\Administrators PSID administratorsSid = NULL; SID_IDENTIFIER_AUTHORITY SIDAuthAdministrators = SECURITY_NT_AUTHORITY;