[PATCH] D72272: [Sanitizers] Elf mapping update of FreeBSD offset

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 11 14:41:16 PST 2020


MaskRay added inline comments.


================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h:27
 # define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) \
-    ((link_map*)((handle) == nullptr ? nullptr : ((char*)(handle) + 560)))
+    ((link_map*)((handle) == nullptr ? nullptr : ((char*)(handle) + 568)))
 // Get sys/_types.h, because that tells us whether 64-bit inodes are
----------------
Can you use `offsetof` instead of the magic number? In the description you can add a reference to the commit that causes the change.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72272





More information about the llvm-commits mailing list