Skip to content

Commit e8a97b2

Browse files
committed
docs: Document how safestack handles setjmp and exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@270634 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent f042fe4 commit e8a97b2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/SafeStack.rst

+11
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,17 @@ Please refer to the `Code-Pointer Integrity <http://dslab.epfl.ch/proj/cpi/>`__
178178
project page for more information about the design of the SafeStack and its
179179
related technologies.
180180

181+
setjmp and exception handling
182+
-----------------------------
183+
184+
The `OSDI'14 paper <http://dslab.epfl.ch/pubs/cpi.pdf>`_ mentions that
185+
on Linux the instrumentation pass finds calls to setjmp or functions that
186+
may throw an exception, and inserts required instrumentation at their call
187+
sites. Specifically, the instrumentation pass saves the shadow stack pointer
188+
on the safe stack before the call site, and restores it either after the
189+
call to setjmp or after an exception has been caught. This is implemented
190+
in the function ``SafeStack::createStackRestorePoints``.
191+
181192
Publications
182193
------------
183194

0 commit comments

Comments
 (0)