Skip to main content

assert_slot_aliasing_sound

Function assert_slot_aliasing_sound 

Source
pub fn assert_slot_aliasing_sound(
    graph: &CompiledGraph,
    slot_labels: &[Vec<&'static str>],
    backend: &str,
)
Expand description

Panic if any alias slot has two members live at once in graph. Members of a slot share bytes, so two live at once means one reads memory the other overwrote, and unlike a barrier gap there is no validation layer behind it on any backend. Every executor calls this per frame under debug_assertions, over the graph it is about to run; backend names the caller in the message.

This is the layer the sweep in this module’s tests cannot be: the pool is planned once per build configuration while graphs compile per frame, and passes that substitute for one another mean there is no single maximal graph to plan against. The sweep covers the input space it models; this covers the graph actually in hand.