Init fault manager even if we don't install signal handlers.

A few tests rely on libsigchain intercepting system calls and won't pass
with default libc implementation. We did not observe any test failures
previously, because all supported architectures enable optimizations
that cause signal handlers to be installed.

Bug: none
Test: art/test.py --target -r --64 --interpreter \
        004-SignalTest \
        305-other-fault-handler
      # observe that the tests pass in switch interpreter mode
      # (disable optimizations that trigger signal handler installation)
Test: art/test.py --host  # ensure the case without libsigchain works
Change-Id: Ie8c1cf3f5add15ccc1225c2147d13b5021ebb25c
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index 84ec7ef..8c0150e 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1768,34 +1768,36 @@
       break;
   }
 
-  if (HandlesSignalsInCompiledCode()) {
+  if (!no_sig_chain_) {
     fault_manager.Init();
 
-    // These need to be in a specific order.  The null point check handler must be
-    // after the suspend check and stack overflow check handlers.
-    //
-    // Note: the instances attach themselves to the fault manager and are handled by it. The
-    //       manager will delete the instance on Shutdown().
-    if (implicit_suspend_checks_) {
-      new SuspensionHandler(&fault_manager);
-    }
+    if (HandlesSignalsInCompiledCode()) {
+      // These need to be in a specific order.  The null point check handler must be
+      // after the suspend check and stack overflow check handlers.
+      //
+      // Note: the instances attach themselves to the fault manager and are handled by it. The
+      //       manager will delete the instance on Shutdown().
+      if (implicit_suspend_checks_) {
+        new SuspensionHandler(&fault_manager);
+      }
 
-    if (implicit_so_checks_) {
-      new StackOverflowHandler(&fault_manager);
-    }
+      if (implicit_so_checks_) {
+        new StackOverflowHandler(&fault_manager);
+      }
 
-    if (implicit_null_checks_) {
-      new NullPointerHandler(&fault_manager);
-    }
+      if (implicit_null_checks_) {
+        new NullPointerHandler(&fault_manager);
+      }
 
-    if (kEnableJavaStackTraceHandler) {
-      new JavaStackTraceHandler(&fault_manager);
-    }
+      if (kEnableJavaStackTraceHandler) {
+        new JavaStackTraceHandler(&fault_manager);
+      }
 
-    if (interpreter::CanRuntimeUseNterp()) {
-      // Nterp code can use signal handling just like the compiled managed code.
-      OatQuickMethodHeader* nterp_header = OatQuickMethodHeader::NterpMethodHeader;
-      fault_manager.AddGeneratedCodeRange(nterp_header->GetCode(), nterp_header->GetCodeSize());
+      if (interpreter::CanRuntimeUseNterp()) {
+        // Nterp code can use signal handling just like the compiled managed code.
+        OatQuickMethodHeader* nterp_header = OatQuickMethodHeader::NterpMethodHeader;
+        fault_manager.AddGeneratedCodeRange(nterp_header->GetCode(), nterp_header->GetCodeSize());
+      }
     }
   }
 
diff --git a/test/knownfailures.json b/test/knownfailures.json
index da318d9..1855429 100644
--- a/test/knownfailures.json
+++ b/test/knownfailures.json
@@ -1549,11 +1549,5 @@
         "description": ["Change of behavior when used with JDK 17."],
         "bug": "b/242985234",
         "variant": "jvm"
-    },
-    {
-        "tests" : ["305-other-fault-handler"],
-        "variant": "interpreter",
-        "description": ["This test intentionally segfaults, but the fault handler is only",
-                        " installed if implicit checks are supported (not for switch interpreter)."]
     }
 ]