[PATCH] DataFlowSanitizer: Add a design doc paragraph on checking ABI consistency.

Peter Collingbourne peter at pcc.me.uk
Mon Aug 19 19:31:49 PDT 2013

Hi kcc,



Index: docs/DataFlowSanitizerDesign.rst
--- docs/DataFlowSanitizerDesign.rst
+++ docs/DataFlowSanitizerDesign.rst
@@ -205,3 +205,16 @@
 internally.  This has the advantage of reducing the number of union operations
 required when the return value label is known to be zero (i.e. ``discard``
 functions, or ``functional`` functions with known unlabelled arguments).
+Checking ABI Consistency
+DFSan changes the ABI of each function in the module.  This makes it possible
+for a function with the native ABI to be called with the instrumented ABI,
+or vice versa, thus possibly invoking undefined behavior.  A simple way
+of statically detecting instances of this problem is to prepend the prefix
+"dfs$" to the name of each instrumented-ABI function.
+This will not catch every such problem; in particular function pointers passed
+across the instrumented-native barrier cannot be used on the other side.
+These problems could potentially be caught dynamically.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D1443.1.patch
Type: text/x-patch
Size: 1061 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130819/73376aff/attachment.bin>

More information about the cfe-commits mailing list