[PATCH] D26632: [sanitizer] Track architecture and UUID of modules in LoadedModule

Filipe Cabecinhas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 29 08:08:22 PST 2016


filcab added a comment.

Almost LGTM, but I have some questions:
How are you planning on using the ModuleArch part? Would it be better (see my inline comment) to just save the `cputype` + `cpusubtype`?
IIUC, you can only have a slice per arch (type+subtype?).
Are you planning on always relying on ModuleArch (or something similar) all the time, or only as a fallback, if no UUID is available?



================
Comment at: lib/sanitizer_common/sanitizer_procmaps_mac.cc:122
+      if (cpusubtype == CPU_SUBTYPE_X86_64_H) return kModuleArchX86_64H;
+      return kModuleArchUnknown;
+    case CPU_TYPE_ARM:
----------------
I wonder if we want a `CHECK(0);` here (or the opposite, a check that the subtype is one of those two). Same for the ARM ones.


https://reviews.llvm.org/D26632





More information about the llvm-commits mailing list