Skip to main content

Module escapes

Module escapes 

Source
Expand description

Escape-set query over points-to sets.

Build an escape-query Program:

use weir::escapes::escapes;

let program = escapes(4, "pts", "escape_set", "out");

Escape analysis: does a value escape the function scope?

Composes the call graph with the points-to set: a value v escapes iff pts(v) intersects the set of nodes reachable from a function’s return / global / heap-store sites. Exposed as a per-node bitset for dataflow consumers to read.

Soundness: MayOver - the points-to is sound (over-approximates), so the escape set is sound.

Structs§

Escapes
Marker type for the escape primitive.

Functions§

escapes
Build an escape-query Program. Inputs: