llebout / ungoogled-chromium

Google Chromium, sans integration with Google - PPC64LE FORK
BSD 3-Clause "New" or "Revised" License
17 stars 5 forks source link

Lots of crashes with latest version #7

Closed darkbasic closed 4 years ago

darkbasic commented 4 years ago

Describe the bug Since I upgrade to latest version (before I was on commit cc339ad1c3f5cb316ed0b03fc49ba2e78d4d8eb2) I noticed lots of websites started crashing ("Aw, Snap!" "Something went wrong when displaying this webpage").

To Reproduce Steps to reproduce the behavior:

  1. Go to https://support.upwork.com/hc/en-us/articles/211063188-Create-a-100-Complete-Freelancer-Profile#
  2. Wait for the tab to crash

Environment (please complete the following information):

llebout commented 4 years ago

Hello, I've been getting them too, I have yet to build in debug mode and investigate. In the future, please report issues over at Gitlab: https://gitlab.com/lle-bout/ungoogled-chromium/issues

Thanks.

llebout commented 4 years ago

Seems to be an upstream issue: https://github.com/Eloston/ungoogled-chromium/issues/828

darkbasic commented 4 years ago

I tried to pull latest version from your repo (including the chromium-77-std-string.patch patch), but unfortunately it still crashes.

llebout commented 4 years ago

I tried to pull latest version from your repo (including the chromium-77-std-string.patch patch), but unfortunately it still crashes.

Yes it still does. Yet to be fixed.

llebout commented 4 years ago

FYI: This is stuck on debug builds not working as-is with the patches.

Current errors are: https://gitlab.com/lle-bout/ungoogled-chromium/-/jobs/307311582

llebout commented 4 years ago

@darkbasic https://github.com/leo-lb/ungoogled-chromium/commit/3fec216b18457cd86c821ec7150f802f768f250f fixes the crashes at the cost of some media decoding features until the actual bug is tracked down by either me, @shawnanastasio or any other volunteer

darkbasic commented 4 years ago

Thanks, it worked!

darkbasic commented 4 years ago

Unfortunately, even if it's way better than before, it still crashes on some websites (ex Facebook).

llebout commented 4 years ago

Unfortunately, even if it's way better than before, it still crashes on some websites (ex Facebook).

@shawnanastasio If that's of any interest to you. ^

shawnanastasio commented 4 years ago

@vddvss traced the issue back to an LLVM codegen bug introduced with commit https://github.com/llvm/llvm-project/commit/14689910737b8e63a0ef7caf407d13aa68bbd6f8.

Until a proper solution is found, it's possible to hack llvm to work around the issue:

index f9871b23314..f71273fb31f 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -1768,7 +1768,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_lrint:
     case Builtin::BI__builtin_lrintf:
     case Builtin::BI__builtin_lrintl:
-      return RValue::get(emitFPToIntRoundBuiltin(*this, E, Intrinsic::lrint));
+      //return RValue::get(emitFPToIntRoundBuiltin(*this, E, Intrinsic::lrint));

     case Builtin::BIllrint:
     case Builtin::BIllrintf:
@@ -1776,7 +1776,7 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
     case Builtin::BI__builtin_llrint:
     case Builtin::BI__builtin_llrintf:
     case Builtin::BI__builtin_llrintl:
-      return RValue::get(emitFPToIntRoundBuiltin(*this, E, Intrinsic::llrint));
+      //return RValue::get(emitFPToIntRoundBuiltin(*this, E, Intrinsic::llrint));

     default:
       break;
llebout commented 4 years ago

fixed using the workaround https://gist.github.com/vddvss/cc5a5e1f5c9b274ea3a85fce343e36a8 made by @vddvss at https://github.com/leo-lb/ungoogled-chromium/commit/76053f8e8e2af9306f489be2487032c5f46ab925 rather than the above LLVM patch

shawnanastasio commented 4 years ago

my earlier workaround should have prevented ff_rfps_add_frame from being called entirely, but @darkbasic was still running into crashes, so I think it's possible that the codegen issue affects multiple parts of the code base

llebout commented 4 years ago

@shawnanastasio waiting for build and will test ASAP!

llebout commented 4 years ago

Seems to work fine with the latest build, though, I wont close this until either Chromium teams bump LLVM revision with one that includes the fixes or I get to include the patch into this repo and apply it to the LLVM tree that we clone. Right now, I do not have time.

llebout commented 4 years ago

https://github.com/leo-lb/ungoogled-chromium/commit/783d1eb3fba9674cc01eb034b6470d4482934688