[PATCH] D51419: Switch syscall(2)/__syscall(2) calls to libc calls on NetBSD

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 4 17:11:42 PDT 2018


krytarowski added a comment.

In https://reviews.llvm.org/D51419#1224011, @vitalybuka wrote:

> Now SANITIZER_NETBSD shares almost nothing with the rest
>  May I ask you to create sanitizer_netbsd.cc and move code there?


I will do it!



================
Comment at: lib/sanitizer_common/sanitizer_linux.cc:204
+  void *real = dlsym(RTLD_NEXT, symbol);
+  if (!real)
+    real = dlsym(RTLD_DEFAULT, symbol);
----------------
vitalybuka wrote:
> This is very similar to GetRealFunctionAddress from interception/interception_linux.cc
> 
> Maybe just use  DEFINE_REAL with INTERCEPT_FUNCTION?
I saw this, but I wasn't sure how to do it. The existing macros are designed to install interceptors, and in my case I'm performing the opposite operation.


Repository:
  rL LLVM

https://reviews.llvm.org/D51419





More information about the llvm-commits mailing list