BurtonQin / lockbud

Statically detect memory, concurrency bugs and possible panic locations for Rust.
BSD 3-Clause "New" or "Revised" License
426 stars 23 forks source link

Fail to find UAF toy bugs #66

Closed BurtonQin closed 1 week ago

BurtonQin commented 1 week ago

After updating to nightly-2024-05-21, lockbud fails to pass the use-after-free tests.

BurtonQin commented 1 week ago

The main reason is the change in Rvalue and Constant in MIR.

  1. Some functions' arguments change from Move to Copy.
  2. Constant has changed a lot, and Rvalue::Aggregate appears in optimized MIR.

I have fixed this issue with two commits: fix: enable checking of raw ptr escaping to return values or params fix missing UAF for pointing to const