Repository navigation
Conversation
State::check_timeout mutates the scheduled-timeout bookkeeping, so wrapping it in debug_assert! compiled the side effect out in release builds, leaving debug and release behavior inconsistent. Closes circlefin#1610
Contributor
|
Contributor
|
Hi @feafel, Thank you for your interest in contributing to Malachite. This PR has been automatically closed because you are not assigned to issue #1610. We require contributors to be explicitly assigned to an issue before submitting a PR. To contribute properly:
Please see our CONTRIBUTING.md for more details. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1610:
State::check_timeoutis not a pure check — it sets thePROPOSE_BITinScheduledTimeouts. Two call sites wrapped it indebug_assert!, which is compiled out in release builds, so the scheduled-timeout bookkeeping behaved differently in debug and release builds.Changes
code/crates/core-state-machine/src/state_machine.rs: callcheck_timeoutunconditionally and assert on its result, at both call sites (propose_valid_or_get_valueandschedule_timeout_propose)This matches the fix suggested in the issue. Running the test suite in release mode in CI would catch similar cases.
Closes #1610
🤖 Generated with Claude Code