Bug 1176085 - Fix second/nanosecond confusion in Linux sandbox start error case. r=kang
authorJed Davis <jld@mozilla.com>
Fri, 19 Jun 2015 14:26:44 -0700
changeset 280618 513d62fe75c9d136042f9ca85b017d3aad3cdc37
parent 280563 c319f262ce3ea3db52aad981abb9f33e36857c3d
child 280619 39ffdb70df06e9e17f28fd9198d251389b1b4363
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskang
bugs1176085
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1176085 - Fix second/nanosecond confusion in Linux sandbox start error case. r=kang
security/sandbox/linux/Sandbox.cpp
--- a/security/sandbox/linux/Sandbox.cpp
+++ b/security/sandbox/linux/Sandbox.cpp
@@ -389,18 +389,18 @@ BroadcastSetThreadSandbox(UniquePtr<sock
           // Rescan threads, in case it forked before exiting.
           // Also, if it somehow failed in a way that wasn't ESRCH,
           // and still exists, that will be handled on the next pass.
           sandboxProgress = true;
           break;
         }
         struct timespec now;
         clock_gettime(CLOCK_MONOTONIC, &now);
-        if (now.tv_sec > timeLimit.tv_nsec ||
-            (now.tv_sec == timeLimit.tv_nsec &&
+        if (now.tv_sec > timeLimit.tv_sec ||
+            (now.tv_sec == timeLimit.tv_sec &&
              now.tv_nsec > timeLimit.tv_nsec)) {
           SANDBOX_LOG_ERROR("Thread %d unresponsive for %d seconds."
                             "  Killing process.",
                             tid, crashDelay);
           MOZ_CRASH();
         }
       }
     }