[PATCH] D77623: [Darwin] Fix a bug where the symbolizer would examine the wrong process.
Dan Liew via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 7 12:32:29 PDT 2020
delcypher marked an inline comment as done.
delcypher added inline comments.
================
Comment at: compiler-rt/test/sanitizer_common/TestCases/Darwin/print-stack-trace-in-code-loaded-after-fork.cpp:45
+ const char *library_to_load = argv[1];
+ void *handle = dlopen(library_to_load, RTLD_NOW | RTLD_LOCAL);
+ assert(handle);
----------------
yln wrote:
> Can you explain why the separately loaded lib/dlopen is required to trigger the error condition? From the commit message I thought that a fork should be enough? Other than that: LGTM
I'm deliberately loading code into the child process that doesn't exist in the parent process. If atos is told examine the parent process then it will be told to examine a PC in `PrintStack` which isn't loaded in that process and so will fail.
I'll add a comment to the test case to explain the reasoning here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77623/new/
https://reviews.llvm.org/D77623
More information about the llvm-commits
mailing list