[PATCH] D78179: [Darwin] Fix symbolization for recent simulator runtimes.

Julian Lettner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 17 13:32:32 PDT 2020


yln accepted this revision.
yln added a comment.
This revision is now accepted and ready to land.

LGTM, with two more tiny nits.



================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.cpp:101
+                                     K_ATOS_ENV_VAR "=%s", pid_str_);
+      CHECK_GE(count, sizeof(K_ATOS_ENV_VAR) + 1);
+      // Document our assumption but without calling `getenv()` in normal
----------------
We could assert "equal" on the exact count `sizeof(K_ATOS_ENV_VAR) + 1 + internal_strlen(pid_str_)`


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.cpp:135
 
+#undef K_ATOS_ENV_VAR
+
----------------
Is this considered good hygiene?  Personally, I would drop it, but I am fine either way.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78179





More information about the llvm-commits mailing list