Merged
Conversation
`ProgressReporter` receives the total number of steps in the ctor and `LogProgress` is expected to be called this number of times, logging the progress in steps. Doing a composite r2r with --verbose is always crashing because logging fails when `total < Steps` due to division by 0 `_increment` (some assemblies being very small). Also, for other small `total` values, percentages over 100 were being logged. This commit fixes the crash and also this incorrect logging.
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes progress reporting in CoreCLR R2R object writing when running with --verbose, preventing crashes and incorrect percentage output for small totals.
Changes:
- Replaced the progress “increment/modulo” calculation with a step-based computation derived from
current/total. - Ensured progress logging only advances when a new step threshold is reached, preventing >100% output and avoiding divide-by-zero from
_increment == 0.
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.
ProgressReporterreceives the total number of steps in the ctor andLogProgressis expected to be called this number of times, logging the progress in steps. Doing a composite r2r with --verbose is always crashing because logging fails whentotal < Stepsdue to division by 0_increment(some assemblies being very small). Also, for other smalltotalvalues, percentages over 100 were being logged. This commit fixes the crash and also this incorrect logging.