[PATCH] D43080: Adding Msan support to FreeBSD

David CARLIER via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 10 23:27:58 PST 2018


devnexen added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_platform_limits_posix.h:27
 # define GET_LINK_MAP_BY_DLOPEN_HANDLE(handle) \
-    ((link_map*)((handle) == nullptr ? nullptr : ((char*)(handle) + 544)))
+    ((link_map*)((handle) == nullptr ? nullptr : ((char*)(handle) + 560)))
 // Get sys/_types.h, because that tells us whether 64-bit inodes are
----------------
krytarowski wrote:
> dim wrote:
> > Hmm, where does this magic number come from? I hope this isn't system version dependent...
> link_map offset in Obj_Entry
Exactly. I found out the proper offset in a FreeBSD 11.1 server with its source code and build llvm in a 10.4 server so I think we re safe at least until FreeBSD 12.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D43080





More information about the llvm-commits mailing list