-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
We detected several double free bugs in your crate via static analysis.
Double free will appear when these function unwind, mainly caused by Vec::from_raw_parts & mem::forget.
In Rust Mir, inserting code between Vec::from_raw_parts & mem::forget will violate exception safety. Because when these code unwind, the Vec generated will drop as well as the entity which ptr pointed to.
rs_teardown_tree/src/base/slot_stack.rs
Line 102 in 0870f3c
let slots = unsafe { Vec::from_raw_parts(self.slots, self.nslots, self.capacity) }; |
rs_teardown_tree/src/base/slot_stack.rs
Line 104 in 0870f3c
mem::forget(slots); |
Metadata
Metadata
Assignees
Labels
No labels