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

Reduce duplicate in liballoc reserve error handling #72734

Merged
merged 1 commit into from
Sep 22, 2020

Conversation

pickfire
Copy link
Contributor

Not sure if it affects compilation time.

@rust-highfive
Copy link
Collaborator

r? @withoutboats

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 29, 2020
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-8 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
##[section]Starting: Linux x86_64-gnu-llvm-8
##[section]Starting: Initialize job
Agent name: 'Hosted Agent'
Agent machine name: 'fv-az619'
Current agent version: '2.168.2'
##[group]Operating System
16.04.6
LTS
LTS
##[endgroup]
##[group]Virtual Environment
Environment: ubuntu-16.04
Version: 20200517.1
Included Software: https://github.com/actions/virtual-environments/blob/ubuntu16/20200517.1/images/linux/Ubuntu1604-README.md
##[endgroup]
Agent running as: 'vsts'
Prepare build directory.
Set build variables.
Download all required tasks.
Download all required tasks.
Downloading task: Bash (3.163.2)
Checking job knob settings.
   Knob: AgentToolsDirectory = /opt/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY} 
   Knob: AgentPerflog = /home/vsts/perflog Source: ${VSTS_AGENT_PERFLOG} 
Start tracking orphan processes.
##[section]Finishing: Initialize job
##[section]Starting: Configure Job Name
==============================================================================
---
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/8282a9a8-e796-47d5-b5b6-da0573c1ec77.sh

##[section]Finishing: Disable git automatic line ending conversion
##[section]Starting: Checkout rust-lang/rust@refs/pull/72734/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
---
##[command]git remote add origin https://github.com/rust-lang/rust
##[command]git config gc.auto 0
##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
##[command]git config --get-all http.proxy
##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/72734/merge:refs/remotes/pull/72734/merge
---
 ---> cb2676f08729
Step 5/8 : ENV RUST_CONFIGURE_ARGS       --build=x86_64-unknown-linux-gnu       --llvm-root=/usr/lib/llvm-8       --enable-llvm-link-shared       --set rust.thin-lto-import-instr-limit=10
 ---> Using cache
 ---> df25ce111862
Step 6/8 : ENV SCRIPT python2.7 ../x.py test --exclude src/tools/tidy &&            python2.7 ../x.py test src/test/mir-opt --pass=build                                   --target=armv5te-unknown-linux-gnueabi &&            python2.7 ../x.py test src/tools/tidy
 ---> 599b9ac96b27
Step 7/8 : ENV NO_DEBUG_ASSERTIONS=1
 ---> Using cache
 ---> 091087e35a36
---
   Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
   Compiling chalk-rust-ir v0.10.0
   Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
   Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
   Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
   Compiling chalk-solve v0.10.0
   Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
   Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
   Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
   Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
   Compiling chalk-rust-ir v0.10.0
   Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
   Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
   Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
   Compiling chalk-solve v0.10.0
   Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
   Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
   Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
..............................................................................i..................... 1800/10252
.................................................................................................... 1900/10252
.................................................................................................i.. 2000/10252
i................................................................................................... 2100/10252
.......................................................................................iiiii........ 2200/10252
.................................................................................................... 2400/10252
.................................................................................................... 2500/10252
.................................................................................................... 2600/10252
.................................................................................................... 2700/10252
---
...............i...............i.................................................................... 5200/10252
.................................................................................................... 5300/10252
...............................................................i.................................... 5400/10252
........................................................i........................................... 5500/10252
....................................................................ii.ii........i...i.............. 5600/10252
...........i........................................................................................ 5800/10252
...................i................................................................................ 5900/10252
........................................................................ii.......................... 6000/10252
...........i........................................................................................ 6100/10252
...........i........................................................................................ 6100/10252
.................................................................................................... 6200/10252
.................................................................................................... 6300/10252
..................................ii...i..ii...........i............................................ 6400/10252
.................................................................................................... 6600/10252
.................................................................................................... 6700/10252
.................................................................................................... 6700/10252
...................................................................i..ii............................ 6800/10252
.................................................................................................... 7000/10252
.................................................................................................... 7100/10252
.....................i.............................................................................. 7200/10252
.................................................................................................... 7300/10252
---
.................................................................................................... 8200/10252
.................................................................................................... 8300/10252
.........................................................i.......................................... 8400/10252
.................................................................................................... 8500/10252
...........iiiiii.iiiiii.i.......................................................................... 8600/10252
.................................................................................................... 8800/10252
.................................................................................................... 8900/10252
.................................................................................................... 9000/10252
.................................................................................................... 9100/10252
---
Suite("src/test/codegen") not skipped for "bootstrap::test::Codegen" -- not in ["src/tools/tidy"]
Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)

running 191 tests
iiii......i..............ii.i..........i.................................i..i................i....i. 100/191
............i.i.i...iii..iiiiiiiiiiiiiiii.F.....................iii................ii......

---- [codegen] codegen/repeat-trusted-len.rs stdout ----


error: verification with 'FileCheck' failed
status: exit code: 1
command: "/usr/lib/llvm-8/bin/FileCheck" "--input-file" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/repeat-trusted-len/repeat-trusted-len.ll" "/checkout/src/test/codegen/repeat-trusted-len.rs"
------------------------------------------

------------------------------------------
stderr:
stderr:
------------------------------------------
/checkout/src/test/codegen/repeat-trusted-len.rs:11:11: error: CHECK: expected string not found in input
// CHECK:***@llvm.memset.p0i8.i{{[0-9]+}}(i8* {{(nonnull )?}}align 1{{.*}} %{{[0-9]+}}, i8 42, i{{[0-9]+}} 100000, i1 false)
          ^
/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen/repeat-trusted-len/repeat-trusted-len.ll:31:33: note: scanning from here
define void @repeat_take_collect(%"alloc::vec::Vec<u8>"* noalias nocapture sret dereferenceable(24)) unnamed_addr #1 personality i32 (i32, i32, i64, %"unwind::libunwind::_Unwind_Exception"*, %"unwind::libunwind::_Unwind_Context"*)* @rust_eh_personality {

------------------------------------------


---
thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/codegen" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/codegen" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "codegen" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-8/bin/FileCheck" "--nodejs" "/usr/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "8.0.0" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"


failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
Build completed unsuccessfully in 1:01:10
Build completed unsuccessfully in 1:01:10
== clock drift check ==
  local time: Fri May 29 12:12:39 UTC 2020
  network time: Fri, 29 May 2020 12:12:39 GMT
== end clock drift check ==

##[error]Bash exited with code '1'.
##[section]Finishing: Run build
##[section]Starting: Checkout rust-lang/rust@refs/pull/72734/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: rust-lang/rust (GitHub)
##[section]Finishing: Checkout rust-lang/rust@refs/pull/72734/merge to s
Cleaning up task key
Start cleaning up orphan processes.
Terminate orphan process: pid (3509) (python)
##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

src/liballoc/raw_vec.rs Outdated Show resolved Hide resolved
@bors
Copy link
Contributor

bors commented Jun 10, 2020

☔ The latest upstream changes (presumably #73190) made this pull request unmergeable. Please resolve the merge conflicts.

@Elinvynia Elinvynia added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 25, 2020
@JohnTitor
Copy link
Member

@pickfire It'd be great if you could rebase instead of merge following our "no merge-commits policy": https://rustc-dev-guide.rust-lang.org/contributing.html#pull-requests

@JohnTitor JohnTitor added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 14, 2020
@pickfire
Copy link
Contributor Author

@pickfire It'd be great if you could rebase instead of merge following our "no merge-commits policy": https://rustc-dev-guide.rust-lang.org/contributing.html#pull-requests

Opps, sorry about that, usually I don't merged, I don't know why I did.

@Dylan-DPC-zz Dylan-DPC-zz added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 18, 2020
@Dylan-DPC-zz
Copy link

@withoutboats this is ready for review

@bors

This comment has been minimized.

@JohnTitor
Copy link
Member

Let's re-assign from libs randomly...
r? @KodrAus

Copy link
Contributor

@KodrAus KodrAus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @pickfire!

I’ve just left two tiny comments.

src/libcore/iter/range.rs Outdated Show resolved Hide resolved
src/libcore/iter/range.rs Outdated Show resolved Hide resolved
@KodrAus KodrAus added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 4, 2020
@pickfire
Copy link
Contributor Author

pickfire commented Aug 4, 2020

@KodrAus I have updated the patch.

@bors
Copy link
Contributor

bors commented Aug 4, 2020

☔ The latest upstream changes (presumably #74850) made this pull request unmergeable. Please resolve the merge conflicts.

@crlf0710
Copy link
Member

@pickfire Ping from triage, CI is still red here. Would you mind fixing this when you've got time?

@pickfire
Copy link
Contributor Author

@crlf0710 I don't understand why it failed, can you please help to check?

Err(AllocError { layout, .. }) => handle_alloc_error(layout),
Ok(()) => { /* yay */ }
}
handle_reserve(self.try_reserve(len, additional));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try_reserve_exact

@Dylan-DPC-zz
Copy link

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented Sep 8, 2020

⌛ Trying commit c5975e9 with merge 7f41ba2ca0111135e5901abcd07df3e03c9027ca...

@bors
Copy link
Contributor

bors commented Sep 8, 2020

☀️ Try build successful - checks-actions, checks-azure
Build commit: 7f41ba2ca0111135e5901abcd07df3e03c9027ca (7f41ba2ca0111135e5901abcd07df3e03c9027ca)

@rust-timer
Copy link
Collaborator

Queued 7f41ba2ca0111135e5901abcd07df3e03c9027ca with parent 5099914, future comparison URL.

@rust-timer
Copy link
Collaborator

Finished benchmarking try commit (7f41ba2ca0111135e5901abcd07df3e03c9027ca): comparison url.

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying rollup- to bors.

Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up.

@bors rollup=never

@pickfire
Copy link
Contributor Author

pickfire commented Sep 9, 2020

I would recommend a perf run before landing this. Previously, even small changes in RawVec have had quite disproportionate effect on run-time / compile-time.

@tmiasko I thought the perf runs only considered compile-time but not run-time?

@Dylan-DPC-zz Dylan-DPC-zz added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 13, 2020
@Dylan-DPC-zz
Copy link

@KodrAus this looks ready to review

@jyn514
Copy link
Member

jyn514 commented Sep 15, 2020

I thought the perf runs only considered compile-time but not run-time?

Since rustc is a bootstrapping compiler, changes to runtime also affect compile time.

@jyn514 jyn514 added T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Sep 15, 2020
@KodrAus
Copy link
Contributor

KodrAus commented Sep 22, 2020

It doesn't look like this has affected perf. Thanks for working on this @pickfire!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Sep 22, 2020

📌 Commit c5975e9 has been approved by KodrAus

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 22, 2020
ecstatic-morse added a commit to ecstatic-morse/rust that referenced this pull request Sep 22, 2020
Reduce duplicate in liballoc reserve error handling

Not sure if it affects compilation time.
bors added a commit to rust-lang-ci/rust that referenced this pull request Sep 22, 2020
…atic-morse

Rollup of 13 pull requests

Successful merges:

 - rust-lang#72734 (Reduce duplicate in liballoc reserve error handling)
 - rust-lang#76131 (Don't use `zip` to compare iterators during pretty-print hack)
 - rust-lang#76150 (Don't recommend ManuallyDrop to customize drop order)
 - rust-lang#76275 (Implementation of Write for some immutable ref structs)
 - rust-lang#76489 (Add explanation for E0756)
 - rust-lang#76581 (do not ICE on bound variables, return `TooGeneric` instead)
 - rust-lang#76655 (Make some methods of `Pin` unstable const)
 - rust-lang#76783 (Only get ImplKind::Impl once)
 - rust-lang#76807 (Use const-checking to forbid use of unstable features in const-stable functions)
 - rust-lang#76888 (use if let instead of single match arm expressions)
 - rust-lang#76914 (extend `Ty` and `TyCtxt` lints to self types)
 - rust-lang#77022 (Reduce boilerplate for BytePos and CharPos)
 - rust-lang#77032 (lint missing docs for extern items)

Failed merges:

r? `@ghost`
@bors
Copy link
Contributor

bors commented Sep 22, 2020

☔ The latest upstream changes (presumably #77039) made this pull request unmergeable. Please resolve the merge conflicts.

Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:

@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Sep 22, 2020
@bors bors merged commit 11f7bfa into rust-lang:master Sep 22, 2020
@rustbot rustbot added this to the 1.48.0 milestone Sep 22, 2020
@pickfire pickfire deleted the liballoc branch September 22, 2020 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.