From ddd332f72beddb28a8fa3df707256c8cd35d6022 Mon Sep 17 00:00:00 2001 From: "Torne (Richard Coles)" Date: Tue, 14 Sep 2021 14:14:06 -0400 Subject: [PATCH] webview: make relro load failure a warning. Failing to open the relro file when loading WebView isn't a major problem (we can still load the library, it just loses a RAM optimization), and can happen in some edge cases like when the current address space reservation was not large enough to create the file. The other messages logged from Java about this are at warning level; make this native error also a warning. The other errors in this function are entirely unexpected conditions, so leave them as errors. Fixes: 197972345 Test: n/a Change-Id: Iaf0d4a3b6e42ba93ef6782b5b9120cd69cae3002 --- native/webview/loader/loader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/webview/loader/loader.cpp b/native/webview/loader/loader.cpp index 1265763d47d3e..94e1e9f8b1c20 100644 --- a/native/webview/loader/loader.cpp +++ b/native/webview/loader/loader.cpp @@ -121,8 +121,8 @@ jint DoLoadWithRelroFile(JNIEnv* env, const char* lib, const char* relro, jobject clazzLoader) { int relro_fd = TEMP_FAILURE_RETRY(open(relro, O_RDONLY)); if (relro_fd == -1) { - ALOGE("Failed to open relro file %s: %s", relro, strerror(errno)); - return LIBLOAD_FAILED_TO_OPEN_RELRO_FILE; + ALOGW("Failed to open relro file %s: %s", relro, strerror(errno)); + return LIBLOAD_FAILED_TO_OPEN_RELRO_FILE; } android_namespace_t* ns = android::FindNamespaceByClassLoader(env, clazzLoader);