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

test: Fix an overflow on empty benchmarks #23127

Merged
merged 1 commit into from
Mar 8, 2015

Conversation

alexcrichton
Copy link
Member

Right now the rust upgrade in cargo is blocked on fixing this overflow. If a
this benchmark is run it will trigger an overflow error today:

#[bench]
fn foo(b: &mut test::Bencher) {}

This commit adds a check on each iteration of the loop that the maximum
multiplier (10) doesn't overflow, and if it does just return the results so far.

@rust-highfive
Copy link
Collaborator

r? @aturon

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member Author

cc @pnkfelix

Right now the rust upgrade in cargo is blocked on fixing this overflow. If a
this benchmark is run it will trigger an overflow error today:

    #[bench]
    fn foo(b: &mut test::Bencher) {}

This commit adds a check on each iteration of the loop that the maximum
multiplier (10) doesn't overflow, and if it does just return the results so far.
@brson
Copy link
Contributor

brson commented Mar 8, 2015

@bors: r+

@bors
Copy link
Contributor

bors commented Mar 8, 2015

@bors r=brson 946a396

@bors
Copy link
Contributor

bors commented Mar 8, 2015

⌛ Testing commit 946a396 with merge b2f09c1...

bors added a commit that referenced this pull request Mar 8, 2015
Right now the rust upgrade in cargo is blocked on fixing this overflow. If a
this benchmark is run it will trigger an overflow error today:

    #[bench]
    fn foo(b: &mut test::Bencher) {}

This commit adds a check on each iteration of the loop that the maximum
multiplier (10) doesn't overflow, and if it does just return the results so far.
@bors bors merged commit 946a396 into rust-lang:master Mar 8, 2015
@alexcrichton alexcrichton deleted the bench-wrapping branch March 27, 2015 20:35
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.

5 participants