[PATCH] D138334: Improve llvm-symbolizer search logic for symlink

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 21 11:40:51 PST 2022


clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

Need to fix the scoping of "Resolved" as mentioned in the inline comments.



================
Comment at: llvm/lib/Support/Signals.cpp:166
+    if (llvm::sys::fs::is_symlink_file(Argv0)) {
+      llvm::SmallString<128> Resolved;
+      if (!llvm::sys::fs::real_path(Argv0, Resolved)) {
----------------
Actually you need to move this out of the "if" statement so it lives long enough for the call to sys::findProgramByName() below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138334



More information about the llvm-commits mailing list