CodeQL library for Rust
codeql/rust-all 0.2.22 (changelog, source)
Search

Module AccessAfterLifetime

Provides default sources, sinks and barriers for detecting accesses to a pointer after its lifetime has ended, as well as extension points for adding your own. Note that a particular (source, sink) pair must be checked with dereferenceAfterLifetime to determine if it is a result.

Import path

import codeql.rust.security.AccessAfterLifetimeExtensions

Predicates

sourceValueScope

Holds if the value pointed to by source accesses a variable target with scope scope.

Classes

Barrier

A barrier for accesses to a pointer after its lifetime has ended.

Source

A data flow source for accesses to a pointer after its lifetime has ended, that is, creation of a pointer or reference.

Aliases

Sink

A data flow sink for accesses to a pointer after its lifetime has ended, that is, a dereference. We re-use the same sinks as for the accesses to invalid pointers query.