Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/monodroid/jni/monodroid-glue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1843,12 +1843,19 @@ a nice and smart library installs a ton of signal handlers and don't chain at al

This is a hack to set llvm::DisablePrettyStackTrace to true and avoid this source of signal handlers.

As of Android 5.0 (API 21) the symbol no longer exists in libLLVM.so and stack pretty printing is an opt-in
instead of an opt-out feature. LLVM change which removed the symbol is at

https://github.com/llvm/llvm-project/commit/c10ca903243f97cbc8014f20c64f1318a57a2936

*/
void
MonodroidRuntime::disable_external_signal_handlers (void)
{
if (!androidSystem.is_mono_llvm_enabled ())
#if !defined (NET)
if (android_api_level >= 21) {
return;
}

void *llvm = androidSystem.load_dso ("libLLVM.so", JAVA_INTEROP_LIB_LOAD_GLOBALLY, TRUE);
if (llvm) {
Expand All @@ -1859,6 +1866,7 @@ MonodroidRuntime::disable_external_signal_handlers (void)
}
//MUST NOT dlclose to ensure we don't lose the hack
}
#endif // ndef NET
}

#if defined (NET)
Expand Down