Merge "Disable stack mprotects when running on valgrind" into lmp-mr1-dev
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index bcfb2fe..d6cafcc 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -760,7 +760,7 @@
     case kArm64:
     case kX86_64:
       implicit_null_checks_ = true;
-      implicit_so_checks_ = true;
+      implicit_so_checks_ = (RUNNING_ON_VALGRIND == 0);
       break;
     default:
       // Keep the defaults.