[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 07:57:12 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;
+ }
----------------
dim wrote:
> 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'.
>
Right, I was thinking about `internal_getpid()`. We wrap other functions too like `sysctl()`.
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