[PATCH] D73990: [Sanitizers] Get link map on FreeBSD via documented API

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 6 06:17:54 PST 2020


krytarowski added inline comments.


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.cpp:97
+    void *p = nullptr;
+    return dlinfo(handle, RTLD_DI_LINKMAP, &p) == 0 ? p : nullptr;
+  }
----------------
Actually please add `internal_dlinfo()` alongside `internal_pid()` and others.

It's sufficient to redirect it for all supported OSs (Linux, FreeBSD, Solaris, NetBSD) to `dlinfo()` for now and stub `/* unimplemented */` for others.

On NetBSD we need to use it indirectly and handle it later.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73990





More information about the llvm-commits mailing list