part of c memory management
detects:
properties:
diagnostic model:
reports memory errors when they are observed
attribution may be less precise than compiler-instrumented tools
effective when rebuilds are not possible or undesirable
what they catch:
properties:
zero runtime cost
low false-negative tolerance
false positives accepted as a tradeoff
what it targets:
properties:
no runtime cost
incomplete by design
results depend heavily on code structure and annotations
detects:
execution model:
diagnostic properties:
aborts at the first invalid access
explicit classification of the violated rule
stack traces typically include allocation and free sites
detects:
role in memory error detection:
many memory corruptions originate from earlier semantic violations
detects these before they propagate into allocator state
properties:
focuses on lifetime and ownership violations
does not detect corruption
typically used in conjunction with other sanitizers
detects:
properties:
ordering rationale:
start with supervision when rebuilds are undesirable
escalate to static diagnostics for low-cost signal
use runtime instrumentation to localize hard memory errors precisely
mechanism:
effect:
limitations:
does not protect all stack objects
does not address heap corruption
does not localize the original overflow
mechanism:
effect:
limitations:
only applies to a subset of libc functions
ineffective when object size cannot be proven
failure occurs at the call site, not necessarily at the original logic error
mechanism:
effect:
limitations:
detection is downstream of the original bug
error messages describe allocator invariants, not program logic
not a substitute for memory error detection during development
these mechanisms:
they do not:
mental model: