[compiler-rt] [sanitizer] Add re-execution on FreeBSD when ASLR is detected (PR #73439)

Dimitry Andric via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 27 13:01:12 PST 2023


================
@@ -47,13 +47,16 @@
 
 #if SANITIZER_FREEBSD
 #include <pthread_np.h>
+#include <stdlib.h>
----------------
DimitryAndric wrote:

Ah, that can actually be removed, it is a leftover from an older version where we called realpath(3) on the result. That code was copied from llvm's GetExecutablePath(), but in this case calling realpath is not necessary, and in fact might be counterproductive if you invoke an executable via a symlink (and expect argv[0] to be the alternative name).


https://github.com/llvm/llvm-project/pull/73439


More information about the llvm-commits mailing list