Mercurial > hg > truffle
changeset 1969:a6b067997c7e
Merge
author | coleenp |
---|---|
date | Fri, 19 Nov 2010 23:46:06 -0500 |
parents | 0b33f0736406 (diff) 4110c3e0c50d (current diff) |
children | e33f46fc48ed |
files | |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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,
--- 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;