Memory Safe Context Switching

A design document explaining how Fil-C makes setjmp, longjmp and the ucontext functions memory safe.

Author
Not stated (a Fil-C documentation page, written in the first person)
Published
Undated
Kind
Project design document
Original
fil-c.org/context_switches
Subject
Systems and hardware

What it is

The page documents how Fil-C, a memory-safe C implementation, supports context switching. It covers setjmp, longjmp and the ucontext functions.

What it says

What evidence it gives

The document gives code examples, an assembly listing, a state machine and a collector scenario. It reports results from gcc 11.4.0 and clang 14.0.0 on one example.

Interests and limits

The project describes its own work. No tests or performance figures appear. The text itself says that bugs would most likely be in two named places. Correctness is argued, not proven.