Skip to content

Check return value bounds: update test#114

Merged
kkjeer merged 1 commit into
masterfrom
check-return-bounds
Aug 27, 2021
Merged

Check return value bounds: update test#114
kkjeer merged 1 commit into
masterfrom
check-return-bounds

Conversation

@kkjeer

@kkjeer kkjeer commented Aug 10, 2021

Copy link
Copy Markdown
Contributor

This PR updates the hash.c test file to account for the compiler behavior in checkedc-clang/1150: checking that the inferred bounds of a return expression imply the declared bounds (if any) for the enclosing function.

There was one function localmalloc in hash.c that returned a variable blah with unknown bounds, which resulted in a compile-time error. This PR declares the bounds byte_count(size) for blah to match the declared bounds byte_count(size) of the localmalloc function.

@sulekhark sulekhark left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@kkjeer kkjeer merged commit e5b8a11 into master Aug 27, 2021
@kkjeer kkjeer deleted the check-return-bounds branch August 27, 2021 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants