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

David CARLIER via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 6 07:32:06 PST 2020


devnexen created this revision.
devnexen added reviewers: vitalybuka, emaste.
devnexen created this object with visibility "All Users".
Herald added projects: Sanitizers, LLVM.
Herald added subscribers: llvm-commits, Sanitizers.

Last year, The Obj_Entry data had been updated with a GOT field, thus updating the offset accordingly, fixing spurious unit tests issues.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72272

Files:
  compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h


Index: compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
===================================================================
--- compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
+++ compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_freebsd.h
@@ -24,7 +24,7 @@
 // FreeBSD's dlopen() returns a pointer to an Obj_Entry structure that
 // incorporates the map structure.
 # 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
 // used in struct dirent below.
 #include <sys/_types.h>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72272.236362.patch
Type: text/x-patch
Size: 746 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200106/71053427/attachment.bin>


More information about the llvm-commits mailing list