immunant / c2rust

Migrate C code to Rust
https://c2rust.com/
Other
3.91k stars 230 forks source link

analyze: tracking issue for simple_buffer #1103

Open spernsteiner opened 2 months ago

spernsteiner commented 2 months ago

simple_buffer is a simplified buffer implementation (similar to Vec<u8>) designed to mimic lighttpd's buffer module.

spernsteiner commented 1 month ago

We can now analyze, rewrite, compile, and run simple_buffer after patching it with workarounds for various c2rust-analyze issues. As we fix the issues tracked here, we can remove the workarounds until simple_buffer works unmodified.

spernsteiner commented 1 month ago

I've implemented fully interprocedural pointee type analysis (on a dev branch - no PR yet), and it now produces correct pointee types for the data field and for all malloc/free/realloc calls. Next I'm planning to look at the borrowck Rvalue::Cast issue.