forked from checkedc/checkedc-clang
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bounds checking for pointer dereferences and array subscripts (checke…
…dc#1176) * Add TargetBounds argument to UpdateAfterAssignment * Update comments to include pointer dereferences and array subscripts * Add LValueAbstractSet argument to UpdateBoundsAfterAssignment * Use the AbstractSet's representative to record equality if LValue belongs to an AbstractSet * Add EmitDeclaredBoundsNote method * Remove requirement that A->GetDecl() must exist from validation methods * Update bounds widening warning comment * Add ExprUtil::IsDereferenceOrSubscript method * Visit pointer dereferences and array subscripts in FindLValueHelper * Visit pointer dereferences and array subscripts in LValueCountHelper * Transform pointer dereference and array subscripts in ReplaceLValueHelper * Update increment/decrement tests for pointer dereferences/array subscripts in bounds-context.c * Add initial test file pointer-dereference-bounds for bounds checking pointer dereferences and array subscripts * PreorderAST: the canonical form of e1[e2] is *(e1 + e2 + 0), not *(e1 + e2) * Add tests for updating dereference and array subscript expressions used in return bounds * Use ExprUtil::IsDereferenceOrSubscript to check for dereference/array subscript expressions in UpdateAfterAssignment * Add more tests to pointer-dereference-bounds.c * Synthesize member expressions that depend on lvalues that use a member expression to update memory * Add tests for synthesizing member expressions that depend on dereferenced member expressions to pointer-dereference-bounds.c * Add tests for synthesizing member expressions whose bounds depend on dereferenced/subscripted member expressions to synthesized-members.c * Add test for bounds-safe interface typed dereferences * Remove else before returns in ReplaceLValueHelper
- Loading branch information
Showing
9 changed files
with
670 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.