fix crash on samsung note 9
This commit is contained in:
parent
4c5c527845
commit
ad6d7ff003
2 changed files with 40 additions and 0 deletions
|
@ -181,3 +181,4 @@ Add-more-private-google-search-engine.patch
|
|||
Enable-StrictOriginIsolation-and-SitePerProcess-flags.patch
|
||||
Site-setting-for-javascript-jit.patch
|
||||
Allow-change-keep-navigation-history.patch
|
||||
Fix-Note9-startup-crash.patch
|
||||
|
|
39
build/patches/Fix-Note9-startup-crash.patch
Normal file
39
build/patches/Fix-Note9-startup-crash.patch
Normal file
|
@ -0,0 +1,39 @@
|
|||
From: uazo <uazo@users.noreply.github.com>
|
||||
Date: Thu, 3 Feb 2022 19:48:49 +0000
|
||||
Subject: Fix Samsung Note 9 startup crash
|
||||
|
||||
---
|
||||
.../base/library_loader/LibraryLoader.java | 18 ++++++++++++++++++
|
||||
1 file changed, 18 insertions(+)
|
||||
|
||||
diff --git a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
|
||||
--- a/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
|
||||
+++ b/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java
|
||||
@@ -505,6 +505,24 @@ public class LibraryLoader {
|
||||
// Note: This cannot be done in the build configuration, as otherwise chrome_public_apk cannot
|
||||
// both be used as the basis to ship on L, and the default APK used by developers on 10+.
|
||||
private boolean forceSystemLinker() {
|
||||
+ // Check from Samsung Galaxy Note 9 (Android 8.1) - Model SM-N960F
|
||||
+ // crashes on startup due to crazylinker not compatible with that device
|
||||
+ // it doesn't support RELRO for that device. we lose relocation sharing
|
||||
+ // but it starts up.
|
||||
+ // see also https://groups.google.com/a/chromium.org/g/chromium-dev/c/iAb7QUiNPLw
|
||||
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=980304
|
||||
+ String manufacturer = Build.MANUFACTURER.toLowerCase(Locale.US);
|
||||
+ if (manufacturer.equals("samsung")
|
||||
+ && Build.MODEL != null
|
||||
+ && Build.MODEL.equals("SM-N960F")) {
|
||||
+ Log.i(TAG, "Configuration: force use System Linker (workaround)");
|
||||
+ // Use system linker without loading crazylinker
|
||||
+ // the attempt with the system linker also happens normally as fallback,
|
||||
+ // but in this case we bypass the load of creazylinker because
|
||||
+ // it messes up the memory causing meaningless crashes
|
||||
+ // at base::MessagePumpForUI::MessagePumpForUI()
|
||||
+ return true;
|
||||
+ }
|
||||
return mUseChromiumLinker && !mUseModernLinker
|
||||
&& Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q;
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
|
Loading…
Add table
Reference in a new issue