Skip to content
This repository has been archived by the owner on Feb 4, 2025. It is now read-only.

check array size for overflows #327

Merged
merged 3 commits into from
Mar 7, 2020
Merged

Conversation

Byter09
Copy link
Contributor

@Byter09 Byter09 commented Mar 6, 2020

resolves #242

@Byter09 Byter09 force-pushed the fix-array-sizeof branch from ac03fc3 to 69c1d82 Compare March 6, 2020 17:52
@Byter09 Byter09 force-pushed the fix-array-sizeof branch from 69c1d82 to 13410e7 Compare March 6, 2020 23:43
@Byter09 Byter09 changed the title use SemanticError and convert the resulting fallout to use it too check array size for overflows Mar 6, 2020
@jyn514
Copy link
Owner

jyn514 commented Mar 7, 2020

@Byter09 this looks good to me, any reason it's still a draft?

@jyn514
Copy link
Owner

jyn514 commented Mar 7, 2020

Oh, but please do add a test for int a[-1u]; either in the unit tests or in tests/runner-tests/decls/ (or expr/arrays/ would also be fine).

@Byter09
Copy link
Contributor Author

Byter09 commented Mar 7, 2020

Done :)

@Byter09 Byter09 marked this pull request as ready for review March 7, 2020 13:52
@jyn514 jyn514 merged commit 8894b4e into jyn514:master Mar 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ICE] crash on multiply in sizeof()
2 participants