]> granicus.if.org Git - clang/commitdiff
docs: Document how safestack handles setjmp and exceptions.
authorPeter Collingbourne <peter@pcc.me.uk>
Tue, 24 May 2016 23:38:02 +0000 (23:38 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Tue, 24 May 2016 23:38:02 +0000 (23:38 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270634 91177308-0d34-0410-b5e6-96231b3b80d8

docs/SafeStack.rst

index 21e9b6c621a8368b6981399999d21b469d76e3ce..f01b75f5cb37c76fb344ecde459c32ea6753d164 100644 (file)
@@ -178,6 +178,17 @@ Please refer to the `Code-Pointer Integrity <http://dslab.epfl.ch/proj/cpi/>`__
 project page for more information about the design of the SafeStack and its
 related technologies.
 
+setjmp and exception handling
+-----------------------------
+
+The `OSDI'14 paper <http://dslab.epfl.ch/pubs/cpi.pdf>`_ mentions that
+on Linux the instrumentation pass finds calls to setjmp or functions that
+may throw an exception, and inserts required instrumentation at their call
+sites. Specifically, the instrumentation pass saves the shadow stack pointer
+on the safe stack before the call site, and restores it either after the
+call to setjmp or after an exception has been caught. This is implemented
+in the function ``SafeStack::createStackRestorePoints``.
+
 Publications
 ------------