diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2013-08-22 20:08:20 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2013-08-22 20:08:20 +0000 |
| commit | 730f3c857472dd33eda184c8124da148d9de52ef (patch) | |
| tree | ed97f2660c34b483b9b39eb05b2b603cc230bba1 /clang/docs/DataFlowSanitizerDesign.rst | |
| parent | 34f0c313e21646b6725bcc6e0d07945114e1f5c1 (diff) | |
| download | bcm5719-llvm-730f3c857472dd33eda184c8124da148d9de52ef.tar.gz bcm5719-llvm-730f3c857472dd33eda184c8124da148d9de52ef.zip | |
DataFlowSanitizer: Add a design doc paragraph on checking ABI consistency.
Differential Revision: http://llvm-reviews.chandlerc.com/D1443
llvm-svn: 189055
Diffstat (limited to 'clang/docs/DataFlowSanitizerDesign.rst')
| -rw-r--r-- | clang/docs/DataFlowSanitizerDesign.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/docs/DataFlowSanitizerDesign.rst b/clang/docs/DataFlowSanitizerDesign.rst index 8f1cc6866d9..32db88bda26 100644 --- a/clang/docs/DataFlowSanitizerDesign.rst +++ b/clang/docs/DataFlowSanitizerDesign.rst @@ -205,3 +205,16 @@ native ABI function directly and the pass will compute the appropriate label 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. |

