Skip to content

Commit ffa359a

Browse files
Comment on Abstract Stack Unwinding
1 parent 09d8bf6 commit ffa359a

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

setjmp/README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ The relevant tag is this one: https://github.com/goblint/analyzer/tree/v2.1.0-lo
1111
Please follow the installation guide given in https://github.com/goblint/analyzer/tree/v2.1.0-longjmp#readme
1212

1313
# Small Litmus Tests
14+
## General
1415

1516
The set of 40-ish small examples is integrated into the set of regression tests for the Goblint.
1617
To run all regression tests, one may simply (in the analyzer directory) call
@@ -23,10 +24,19 @@ In order to run one specific example, one may run
2324
2425
where `NN` is the number at the beginning of the testcase in folder `tests/regression/66-longjmp/NN-one.c`.
2526
One may then inspect a visual representation of the results by serving the
26-
`result` directory and accessing it via a browser. For details, refer to https://goblint.readthedocs.io/en/latest/user-guide/inspecting/
27-
27+
`result` directory and accessing it via a browser. For details, refer to https://goblint.readthedocs.io/en/latest/user-guide/inspecting/.
2828
The runtime for all these litmus tests is negligible.
2929

30+
## Abstract Stack Unwinding
31+
32+
We would like to particularly point out test `66/22` that demonstrates the need for abstract stack unwinding:
33+
- `main` calls `setjmp`
34+
- A pointer to `val` is passed to `fun` which sets `val` to `1`.
35+
- `fun` then calls `foo`. `foo` is not passed a pointer to `val`, and thus `val` does not appear in its local state.
36+
- `foo` causes a `longjmp` back to `main`
37+
38+
Here, in order to account for the modification of `val`, it is necessary to pass values up the callstack, and calling $\textsf{combine}^\sharp$ while unwinding the stack.
39+
3040
# `Libpng` example
3141

3242
## Current Version

0 commit comments

Comments
 (0)