[PATCH] D48451: [sanitizers_common] when spawning a subprocess for symbolizers, use posix_spawn instead of fork()

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 25 13:02:09 PDT 2018


eugenis added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_posix_libcdep.cc:443
+// Android and we can drop that.
+#if !SANITIZER_ANDROID || __ANDROID_API__ >= 28
+pid_t StartSubprocess(const char *program, const char *const argv[],
----------------
This check can be done at runtime by using weak declarations.



================
Comment at: lib/sanitizer_common/sanitizer_posix_libcdep.cc:459
+  posix_spawn_file_actions_t fa;
+  int result = posix_spawn_file_actions_init(&fa);
+  if (result != 0) {
----------------
Do you need to destroy the file_actions object?


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D48451





More information about the llvm-commits mailing list