Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

separate if statements for Incr and Decr operators #39

Merged
merged 1 commit into from Jun 14, 2016

Conversation

Panos90
Copy link

@Panos90 Panos90 commented Jun 13, 2016

The condition on StatementFor.cpp:103 eliminates any chance of an overflow/underflow when CGOptions::fast_execution() is disabled.

However, in StatementFor.cpp:113, the fact that incr_op is assigned depending only on the condition limit >= init re-introduces the chance of an overflow/underflow when limit == init.

I 'm not sure if this behaviour is intentional. If it is you can ignore this pull request.

@jxyang
Copy link
Member

jxyang commented Jun 14, 2016

The original intention was to consolidate all ++/-- cases in one if-statement. The code has been changed much so that a separation is warranted. Nice catch.

@jxyang jxyang merged commit 6ee876f into csmith-project:master Jun 14, 2016
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.

None yet

2 participants