[art] Yama LSM isn't mandatory
Some machines building debug builds don't have YAMA enabled (and it
doesn't seem to be mandatory for running/testing ART debug builds)
Test: ./test/testrunner/testrunner.py -b --host -t 001-HelloWorld
Change-Id: I1aa258380ddbf8c4f59ea22a9d901169ba448ef8
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 99980c5..a500d9f 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -838,7 +838,9 @@
// Only 64-bit as prctl() may fail in 32 bit userspace on a 64-bit kernel.
#if defined(__linux__) && !defined(ART_TARGET_ANDROID) && defined(__x86_64__)
if (kIsDebugBuild) {
- CHECK_EQ(prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY), 0);
+ if (prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY) != 0) {
+ PLOG(WARNING) << "Failed setting PR_SET_PTRACER to PR_SET_PTRACER_ANY";
+ }
}
#endif