summaryrefslogtreecommitdiffstats
path: root/content/common
diff options
context:
space:
mode:
authorjln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-13 02:00:45 +0000
committerjln@chromium.org <jln@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-13 02:00:45 +0000
commite13a342f0269d31e675d21993378c452581b2688 (patch)
treeccd5e121f2fc57564a2bb9c998640c8945bc4f83 /content/common
parentee263526969367b464f6b02d88181453d1995342 (diff)
downloadchromium_src-e13a342f0269d31e675d21993378c452581b2688.zip
chromium_src-e13a342f0269d31e675d21993378c452581b2688.tar.gz
chromium_src-e13a342f0269d31e675d21993378c452581b2688.tar.bz2
Linux BPF sandbox: report process type on failure
Report the type of process when CheckSingleThreaded() fails. BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10548014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@141825 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r--content/common/sandbox_init_linux.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/content/common/sandbox_init_linux.cc b/content/common/sandbox_init_linux.cc
index 62e89ff..2c078d0 100644
--- a/content/common/sandbox_init_linux.cc
+++ b/content/common/sandbox_init_linux.cc
@@ -76,7 +76,7 @@
namespace {
-static void CheckSingleThreaded() {
+static void CheckSingleThreaded(const std::string& process_type) {
// Possibly racy, but it's ok because this is more of a debug check to catch
// new threaded situations arising during development.
int num_threads =
@@ -86,7 +86,9 @@ static void CheckSingleThreaded() {
// We pass the check if we don't know ( == 0), because the setuid sandbox
// will prevent /proc access in some contexts.
DCHECK((num_threads == 1 || num_threads == 0)) << "Counted "
- << num_threads << " threads";
+ << num_threads << " threads "
+ << "in " << process_type
+ << ".";
}
static void SIGSYS_Handler(int signal, siginfo_t* info, void* void_context) {
@@ -429,7 +431,7 @@ void InitializeSandbox() {
if (!CanUseSeccompFilters())
return;
- CheckSingleThreaded();
+ CheckSingleThreaded(process_type);
std::vector<struct sock_filter> program;
EmitPreamble(&program);