[PATCH] D146745: [sanitizers] Explainer about dyld and weak overrides on Darwin.
Roy Sundahl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 23 11:05:15 PDT 2023
rsundahl updated this revision to Diff 507827.
rsundahl added a comment.
Include a better summary
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146745/new/
https://reviews.llvm.org/D146745
Files:
llvm/docs/ReleaseNotes.rst
Index: llvm/docs/ReleaseNotes.rst
===================================================================
--- llvm/docs/ReleaseNotes.rst
+++ llvm/docs/ReleaseNotes.rst
@@ -231,6 +231,17 @@
Changes to Sanitizers
---------------------
+* For users of weak overrides on Darwin, the dynamic linker (dyld) will only
+ consider symbols from other mach-o modules (dylibs and main executable), which
+ themselves contain at least one weak symbol. A consequence of this is that if
+ your main program contains an intended override of a sanitizer weak reference,
+ then it must contain at least one weak symbol. (NB: This symbol may be the
+ intended override itself). ::
+
+ Example:
+ __attribute__((weak,unused)) unsigned __enableOverrides;
+ or:
+ __attribute__((weak)) void __asan_on_error(void) {...}
Other Changes
-------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146745.507827.patch
Type: text/x-patch
Size: 850 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230323/88869fa0/attachment.bin>
More information about the llvm-commits
mailing list