Skip to content

Fix issue with niches on signed values#1542

Merged
danielsn merged 1 commit intomodel-checking:mainfrom
danielsn:niche-fix
Aug 17, 2022
Merged

Fix issue with niches on signed values#1542
danielsn merged 1 commit intomodel-checking:mainfrom
danielsn:niche-fix

Conversation

@danielsn
Copy link
Contributor

Description of changes:

Currently, Kani fails to correctly handle niche optimizations when the underlying data-type is signed.
Use unsigned comparisons (as the rustc backend does) to fix this issue.

Resolved issues:

Resolves #1533

Call-outs:

The niche code is confusing, filed #1540 to track

Testing:

  • How is this change tested? Additional test.

  • Is this a refactor change? No

Checklist

  • Each commit message has a non-empty body, explaining why the change was made
  • Methods or procedures are documented
  • Regression or unit tests are included, or existing tests cover the modified code
  • My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

@danielsn danielsn requested a review from a team as a code owner August 17, 2022 21:31
@danielsn danielsn merged commit 298002d into model-checking:main Aug 17, 2022
@danielsn danielsn deleted the niche-fix branch August 17, 2022 22:29
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.

Niche optimization encoding is broken

2 participants