Expand description
RAII Tracking Module
This module implements advanced RAII (Resource Acquisition Is Initialization) tracking:
- Phase 1: Reference/pointer stored in container outliving pointee
- Phase 2: User-defined RAII types (classes with destructors)
- Phase 3: Iterator outlives container
- Phase 4: Lambda escape analysis (refined)
- Phase 5: Member lifetime tracking
- Phase 6: new/delete tracking
- Phase 7: Constructor initialization order
Structs§
- Container
Borrow - Track pointers/references stored in containers When a pointer is stored in a container, the pointee must outlive the container
- Heap
Allocation - Track heap allocations
- Iterator
Borrow - Track iterator borrows from containers
- Lambda
Capture - Track lambda captures and their escape potential
- Member
Borrow - Track references to object members (Phase 5) When &obj.field is taken, the reference has the same lifetime as obj
- Raii
Tracker - Main RAII tracker that coordinates all RAII-related tracking
Enums§
- Allocation
State - Track new/delete operations for double-free and use-after-free detection
Functions§
- check_
raii_ issues - Check for RAII-related issues in a function
- has_
user_ defined_ destructor - Check if a type has a user-defined destructor This is used for Phase 2: User-defined RAII types