checkedc / checkedc-fork

This was a fork of Checked C used from 2021-2024. The changes have been merged into the original Checked C repo.
Other
26 stars 3 forks source link

Bounds checking for pointer dereferences and array subscripts: update test #469

Closed secure-sw-dev-bot closed 2 years ago

secure-sw-dev-bot commented 2 years ago

This issue was copied from https://github.com/microsoft/checkedc/issues/472


This PR updates some expected error messages to reflect the behavior in checkedc-clang/1176: for a pointer dereference or array subscript with target bounds, bounds validation uses the existing framework in UpdateAfterAssignment and ValidateBoundsContext to validate these expressions. This means that the error messages emitted for pointer dereferences or array subscripts whose inferred bounds are unknown have been updated to be consistent with the error messages for checking variables and member expressions, so the expected error messages in the test file bounds_decl_checking.c are updated.