checkedc / checkedc-llvm-project

This repo contains a version of clang that is modified to support Checked C. Checked C is an extension to C that lets programmers write C code with bounds checking and improved type-safety.
13 stars 19 forks source link

Epic: implement flow-sensitive bounds declarations #1207

Open dtarditi opened 1 year ago

dtarditi commented 1 year ago

The bounds widening for pointers to null-terminated arrays relies on flow-sensitive bounds declarations for widening bounds using strlen. Currently the bounds widening is unsound because the flow-sensitive bounds declarations are not checked or used. We should implement flow-sensitive bounds checking. The implementation can be done in 4 stages: