[PATCH] D73990: [Sanitizers] Get link map on FreeBSD via documented API
Dimitry Andric via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 6 06:35:48 PST 2020
dim marked an inline comment as done.
dim 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;
+ }
----------------
krytarowski wrote:
> 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.
Hm, I don't see any `internal_pid()` anywhere, but there are quite a lot of `internal_` functions in compiler-rt/lib/sanitizer_common/sanitizer_libc.cpp. Is that the right location? It seems that these are all more like hand-rolled versions of known libc functions, not some sort of 'forwarders'.
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