[PATCH] D77283: scudo: Add support for diagnosing memory errors when memory tagging is enabled.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 6 13:37:48 PDT 2020


pcc marked an inline comment as done.
pcc added inline comments.


================
Comment at: compiler-rt/lib/scudo/standalone/combined.h:746
+    *ErrorInfo = {};
+    if (!PrimaryT::SupportsMemoryTagging)
+      return;
----------------
hctim wrote:
> I don't think we can assume that `typeof(PrimaryT)` is the same between dead process, and crash handler, right? Same as below with `findNearestBlock()`? A 32-bit process can use a 64-bit crash_handler, right (and I'm not sure whether there's any svelte vs. non-svelte crossover)? I see from your AOSP patches right now we unconditionally create `ScudoCrashData` even though there might be incompatibilities.
On Android the bitness is always the same. See e.g.
https://cs.android.com/android/platform/superproject/+/master:system/core/debuggerd/handler/debuggerd_handler.cpp;l=83

You can also find assumptions about the process bitness e.g. here:
https://cs.android.com/android/platform/superproject/+/master:system/core/debuggerd/libdebuggerd/tombstone.cpp;l=336

We may need to do something about svelte, but not immediately since the svelte allocator is not used on Android (svelte devices use jemalloc).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77283/new/

https://reviews.llvm.org/D77283





More information about the llvm-commits mailing list