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

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 13:13:46 PDT 2020


kubamracek added inline comments.


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.cpp:98
+      // `atos_mach_port_env_var_entry_` variable with our current PID.
+      const char *current_atos_env_var = getenv(kAtosEnvVar);
+      if (current_atos_env_var !=
----------------
delcypher wrote:
> kubamracek wrote:
> > I'd rather not call getenv here too. We can just access `atos_mach_port_env_var_entry_` directly, no? Also, why not just unconditionally call updateAtosEnvVar?
> The reason is that I wanted to check our assumption is that the `__check_mach_ports_lookup` environment variable is still in the environment **and** that we still control it.
> 
> This assumption could be broken by the user's code changing the environment.
> 
> If you don't care about detecting this case so that we can fail more gracefully then I can rip this out which also means I can rip out `getValueFromEnvEntry()` as well.
Yes, let's not worry about the user overwriting that env var.


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