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

Add Vec::get_uninit_unchecked #70967

Closed
wants to merge 2 commits into from
Closed

Conversation

moshg
Copy link

@moshg moshg commented Apr 10, 2020

This is intended to reduce misusing get_unchecked_mut to access out of bounds.
In addition, we can detect out-of-allocation with this method unlike x.as_ptr_mut().add(index).

I hope this to help get_unchecked to do bound check in debug build in the future. #36976

Though immutable get_uninit_unchecked is useless, should I name get_uninit_unchecked_mut?

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @joshtriplett (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 10, 2020
@rust-highfive

This comment has been minimized.

@moshg moshg force-pushed the get_uninit branch 2 times, most recently from 04c9896 to 0348abf Compare April 10, 2020 01:47
@rust-highfive

This comment has been minimized.

@moshg moshg force-pushed the get_uninit branch 2 times, most recently from fe80faa to 2225c47 Compare April 10, 2020 02:33
/// assert_eq!(&*x, &[0, 1, 2, 3]);
/// ```
#[unstable(feature = "vec_get_uninit_unchecked", issue = "none")]
pub fn get_uninit_unchecked(&mut self, index: usize) -> &mut MaybeUninit<T> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
pub fn get_uninit_unchecked(&mut self, index: usize) -> &mut MaybeUninit<T> {
pub unsafe fn get_uninit_unchecked(&mut self, index: usize) -> &mut MaybeUninit<T> {

There are two ways in which you can violate soundness with this method:

  1. You provide index where index >= self.capacity().
  2. You do let elem = vec.get_uninit_unchecked(index); *elem = MaybeUninit::uninit(); drop(vec[index]);.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, you can have a memory leak if you forget to use vec.set_len(...) afterwards in some circumstances; also worth noting in docs.

@Centril Centril 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 Apr 10, 2020
@rust-highfive
Copy link
Contributor

The job x86_64-gnu-llvm-7 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.
2020-04-10T14:53:22.1391532Z ========================== Starting Command Output ===========================
2020-04-10T14:53:22.1395913Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/b8b0c5ac-5847-48df-b8d6-36abdef49c13.sh
2020-04-10T14:53:22.1396372Z 
2020-04-10T14:53:22.1400394Z ##[section]Finishing: Disable git automatic line ending conversion
2020-04-10T14:53:22.1417858Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/70967/merge to s
2020-04-10T14:53:22.1421142Z Task         : Get sources
2020-04-10T14:53:22.1421434Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-10T14:53:22.1421942Z Version      : 1.0.0
2020-04-10T14:53:22.1422120Z Author       : Microsoft
---
2020-04-10T14:53:23.3127561Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-04-10T14:53:23.3138024Z ##[command]git config gc.auto 0
2020-04-10T14:53:23.3145201Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-04-10T14:53:23.3151466Z ##[command]git config --get-all http.proxy
2020-04-10T14:53:23.3162335Z ##[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/70967/merge:refs/remotes/pull/70967/merge
---
2020-04-10T14:54:58.3884788Z Looks like docker image is the same as before, not uploading
2020-04-10T14:55:06.0480455Z [CI_JOB_NAME=x86_64-gnu-llvm-7]
2020-04-10T14:55:06.0806933Z [CI_JOB_NAME=x86_64-gnu-llvm-7]
2020-04-10T14:55:06.0835563Z == clock drift check ==
2020-04-10T14:55:06.0844863Z   local time: Fri Apr 10 14:55:06 UTC 2020
2020-04-10T14:55:06.2782723Z   network time: Fri, 10 Apr 2020 14:55:06 GMT
2020-04-10T14:55:06.2813971Z Starting sccache server...
2020-04-10T14:55:06.3625853Z configure: processing command line
2020-04-10T14:55:06.3626450Z configure: 
2020-04-10T14:55:06.3627510Z configure: rust.dist-src        := False
---
2020-04-10T15:00:37.2477865Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-10T15:00:38.7500980Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-10T15:00:40.4459013Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-10T15:00:42.0565076Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-10T15:00:51.4383018Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-10T15:00:54.3021023Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-10T15:00:58.9618357Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-10T15:01:03.3566947Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-10T15:01:13.7407726Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-10T15:25:18.3322884Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-10T15:25:20.2920936Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-10T15:25:22.3834315Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-10T15:25:24.4634891Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-10T15:25:35.4030144Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-10T15:25:39.5617376Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-10T15:25:45.1356256Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-10T15:25:50.7825363Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-10T15:26:01.7536635Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-10T15:52:52.7497555Z .................................................................................................... 1600/9883
2020-04-10T15:52:59.2945861Z .................................................................................................... 1700/9883
2020-04-10T15:53:03.7381372Z .................................................................................................... 1800/9883
2020-04-10T15:53:12.6674894Z .................................................................................................... 1900/9883
2020-04-10T15:53:20.9776653Z ..i................................................................................................. 2000/9883
2020-04-10T15:53:27.5492918Z .............................................................................................iiiii.. 2100/9883
2020-04-10T15:53:49.1388686Z .................................................................................................... 2300/9883
2020-04-10T15:53:51.3346699Z .................................................................................................... 2400/9883
2020-04-10T15:53:53.5197691Z .................................................................................................... 2500/9883
2020-04-10T15:53:59.3140519Z .................................................................................................... 2600/9883
---
2020-04-10T15:57:03.7813876Z .................................................................................................... 5100/9883
2020-04-10T15:57:12.0266571Z .................................................................................................... 5200/9883
2020-04-10T15:57:17.2001740Z ...........i........................................................................................ 5300/9883
2020-04-10T15:57:27.5508601Z .................................................................................................... 5400/9883
2020-04-10T15:57:32.4134441Z ii.ii........i...i.................................................................................. 5500/9883
2020-04-10T15:57:40.2324751Z .............................................i...................................................... 5700/9883
2020-04-10T15:57:50.7470606Z .................................................................ii................................. 5800/9883
2020-04-10T15:57:57.2153498Z ....i............................................................................................... 5900/9883
2020-04-10T15:58:02.9539064Z .................................................................................................... 6000/9883
2020-04-10T15:58:02.9539064Z .................................................................................................... 6000/9883
2020-04-10T15:58:12.7676456Z ..................................................................................................ii 6100/9883
2020-04-10T15:58:24.2402249Z ...i..ii...........i................................................................................ 6200/9883
2020-04-10T15:58:40.2930792Z .................................................................................................... 6400/9883
2020-04-10T15:58:46.2000125Z .................................................................................................... 6500/9883
2020-04-10T15:58:46.2000125Z .................................................................................................... 6500/9883
2020-04-10T15:59:00.2082131Z ............................i..ii................................................................... 6600/9883
2020-04-10T15:59:21.6729332Z .................................................................................................... 6800/9883
2020-04-10T15:59:23.7652801Z ............................i....................................................................... 6900/9883
2020-04-10T15:59:25.8420873Z .................................................................................................... 7000/9883
2020-04-10T15:59:28.0260776Z ...................................................................i................................ 7100/9883
---
2020-04-10T16:01:08.7849991Z .................................................................................................... 7800/9883
2020-04-10T16:01:12.7665809Z .................................................................................................... 7900/9883
2020-04-10T16:01:19.2896295Z .................................................................................................... 8000/9883
2020-04-10T16:01:26.3684117Z ................................i................................................................... 8100/9883
2020-04-10T16:01:35.0650251Z ................................................................................iiiiii.iiii.i....... 8200/9883
2020-04-10T16:01:51.0514021Z .........................i......i................................................................... 8400/9883
2020-04-10T16:01:54.9299565Z .................................................................................................... 8500/9883
2020-04-10T16:02:06.1604608Z .................................................................................................... 8600/9883
2020-04-10T16:02:18.6394352Z .................................................................................................... 8700/9883
---
2020-04-10T16:04:45.0979206Z Suite("src/test/codegen") not skipped for "bootstrap::test::Codegen" -- not in ["src/tools/tidy"]
2020-04-10T16:04:45.1148126Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-04-10T16:04:45.3388620Z 
2020-04-10T16:04:45.3389377Z running 185 tests
2020-04-10T16:04:48.1961481Z iiii......i............ii.i..iiii....i....i...........i............i..i..................i....i..... 100/185
2020-04-10T16:04:51.5216361Z .......i.i.i...iii..iiiiiiiiiiiiiiii.......................iii...............ii......
2020-04-10T16:04:51.5291211Z 
2020-04-10T16:04:51.5291368Z  finished in 5.743
2020-04-10T16:04:51.5292009Z Suite("src/test/codegen-units") not skipped for "bootstrap::test::CodegenUnits" -- not in ["src/tools/tidy"]
2020-04-10T16:04:51.5292772Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-04-10T16:04:53.0513748Z Suite("src/test/assembly") not skipped for "bootstrap::test::Assembly" -- not in ["src/tools/tidy"]
2020-04-10T16:04:53.0691547Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-04-10T16:04:53.2162522Z 
2020-04-10T16:04:53.2162858Z running 9 tests
2020-04-10T16:04:53.2163849Z iiiiiiiii
2020-04-10T16:04:53.2164769Z 
2020-04-10T16:04:53.2168451Z  finished in 0.147
2020-04-10T16:04:53.2174329Z Suite("src/test/incremental") not skipped for "bootstrap::test::Incremental" -- not in ["src/tools/tidy"]
2020-04-10T16:04:53.2339697Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-04-10T16:05:13.9499440Z ebuginfo") not skipped for "bootstrap::test::Debuginfo" -- not in ["src/tools/tidy"]
2020-04-10T16:05:13.9733349Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-04-10T16:05:14.1651603Z 
2020-04-10T16:05:14.1652387Z running 115 tests
2020-04-10T16:05:27.9615926Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii.........i.....i..i.......ii.i.ii.. 100/115
2020-04-10T16:05:29.7350817Z ...iiii.....ii.
2020-04-10T16:05:29.7352924Z 
2020-04-10T16:05:29.7353240Z  finished in 15.762
2020-04-10T16:05:29.7360602Z Suite("src/test/ui-fulldeps") not skipped for "bootstrap::test::UiFullDeps" -- not in ["src/tools/tidy"]
2020-04-10T16:05:29.7362881Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-04-10T16:18:56.9010525Z 
2020-04-10T16:18:56.9014722Z    Doc-tests core
2020-04-10T16:19:01.7211556Z 
2020-04-10T16:19:01.7212684Z running 2490 tests
2020-04-10T16:19:10.9405870Z ......iiiii......................................................................................... 100/2490
2020-04-10T16:19:20.0268519Z .....................................................................................ii............. 200/2490
2020-04-10T16:19:40.8380006Z ....................i............................................................................... 400/2490
2020-04-10T16:19:40.8380006Z ....................i............................................................................... 400/2490
2020-04-10T16:19:50.7649291Z ..........................................................................i..i..................iiii 500/2490
2020-04-10T16:20:06.7979975Z .................................................................................................... 700/2490
2020-04-10T16:20:15.0298881Z .................................................................................................... 800/2490
2020-04-10T16:20:23.2880706Z .................................................................................................... 900/2490
2020-04-10T16:20:31.5700153Z .................................................................................................... 1000/2490
---
2020-04-10T16:23:55.0334581Z .................................................thread '<unnamed>' panicked at 'explicit panic', src/libstd/io/stdio.rs:888:13
2020-04-10T16:23:55.0338799Z . 300/764
2020-04-10T16:23:55.1784114Z .................................................................................................... 400/764
2020-04-10T16:23:57.2731981Z .................................................................................................... 500/764
2020-04-10T16:23:57.3042795Z ......................thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError.', src/libstd/sync/mpsc/mod.rs:2741:22
2020-04-10T16:23:57.3067222Z ....thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvErrorthread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libstd/sync/mpsc/mod.rs:2766:17
2020-04-10T16:23:57.3068388Z ', src/libstd/sync/mpsc/mod.rs:2778:21
2020-04-10T16:23:57.3089684Z .......thread '<unnamed>.' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:2645:13
2020-04-10T16:23:57.5448219Z ........................................thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:1997:22
2020-04-10T16:23:57.5464586Z .....thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:2034:21
2020-04-10T16:23:57.5488930Z ......thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:1916:13
2020-04-10T16:23:59.5885992Z ............................thread '<unnamed>' panicked at 'explicit panic', src/libstd/sync/mutex.rs:633:13
2020-04-10T16:23:59.5888503Z thread '<unnamed>' panicked at 'test panic in inner thread to poison mutex', src/libstd/sync/mutex.rs:587:13
2020-04-10T16:23:59.5899071Z thread '<unnamed>' panicked at 'test panic in inner thread to poison mutex', src/libstd/sync/mutex.rs:563:13
2020-04-10T16:23:59.5901078Z thread '<unnamed>' panicked at 'explicit panic', src/libstd/sync/mutex.rs:694:13
---
2020-04-10T16:24:08.6244131Z 
2020-04-10T16:24:08.6244440Z running 1019 tests
2020-04-10T16:24:26.4441841Z i................................................................................................... 100/1019
2020-04-10T16:24:36.4985869Z .................................................................................................... 200/1019
2020-04-10T16:24:43.8717590Z ..................iii......i......i...i......i...................................................... 300/1019
2020-04-10T16:24:55.1197933Z ...................................................i....i......................................ii... 500/1019
2020-04-10T16:25:02.5764040Z .................................................................................................... 600/1019
2020-04-10T16:25:07.4197048Z .................................................................................................... 700/1019
2020-04-10T16:25:07.4197048Z .................................................................................................... 700/1019
2020-04-10T16:25:14.3662244Z .............................................iiii................................................... 800/1019
2020-04-10T16:25:28.3112954Z .................................................................................................... 900/1019
2020-04-10T16:25:34.3816341Z ...................................................................iiii............................. 1000/1019
2020-04-10T16:25:35.6320735Z test result: ok. 999 passed; 0 failed; 20 ignored; 0 measured; 0 filtered out
2020-04-10T16:25:35.6321119Z 
2020-04-10T16:25:35.6437523Z  finished in 169.109
2020-04-10T16:25:35.6442233Z Set({"src/libterm"}) not skipped for "bootstrap::test::Crate" -- not in ["src/tools/tidy"]
---
2020-04-10T16:28:59.6548721Z 
2020-04-10T16:28:59.6548964Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
2020-04-10T16:28:59.6549237Z 
2020-04-10T16:28:59.6606151Z  finished in 1.036
2020-04-10T16:28:59.6611174Z Set({"/checkout/src/librustc_query_system"}) not skipped for "bootstrap::test::CrateLibrustc" -- not in ["src/tools/tidy"]
2020-04-10T16:28:59.6632122Z Testing rustc_query_system stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-04-10T16:28:59.8485459Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-10T16:29:00.8472165Z      Running build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_query_system-6ca30117392aa36d
2020-04-10T16:29:00.8500003Z 
2020-04-10T16:29:00.8500703Z running 0 tests
2020-04-10T16:29:00.8500979Z 
---
2020-04-10T16:43:08.3866241Z     Checking core v0.0.0 (/checkout/src/libcore)
2020-04-10T16:43:14.3714542Z    Compiling compiler_builtins v0.1.25
2020-04-10T16:43:29.8936525Z     Checking rustc-std-workspace-core v1.99.0 (/checkout/src/tools/rustc-std-workspace-core)
2020-04-10T16:43:31.0925994Z  Documenting alloc v0.0.0 (/checkout/src/liballoc)
2020-04-10T16:43:33.6586576Z error: `[set_len]` cannot be resolved, ignoring it.
2020-04-10T16:43:33.6588621Z     |
2020-04-10T16:43:33.6588621Z     |
2020-04-10T16:43:33.6589677Z 864 |     /// *[undefined behavior]* to call other methods or drop the vector before using [`set_len`]
2020-04-10T16:43:33.6591954Z     |
2020-04-10T16:43:33.6592626Z note: the lint level is defined here
2020-04-10T16:43:33.6593401Z    --> src/liballoc/lib.rs:72:9
2020-04-10T16:43:33.6594043Z     |
2020-04-10T16:43:33.6594043Z     |
2020-04-10T16:43:33.6595011Z 72  | #![deny(intra_doc_link_resolution_failure)] // rustdoc is run without -D warnings
2020-04-10T16:43:33.6597533Z     = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
2020-04-10T16:43:33.6598050Z 
2020-04-10T16:43:33.6598050Z 
2020-04-10T16:43:33.6598694Z error: `[set_len]` cannot be resolved, ignoring it.
2020-04-10T16:43:33.6600349Z     |
2020-04-10T16:43:33.6600349Z     |
2020-04-10T16:43:33.6601231Z 866 |     /// You can have a memory leak if you forget to use [`set_len`] to make the index in bounds
2020-04-10T16:43:33.6603171Z     |
2020-04-10T16:43:33.6604284Z     = help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
2020-04-10T16:43:33.6604765Z 
2020-04-10T16:43:33.7710190Z error: aborting due to 2 previous errors
2020-04-10T16:43:33.7710190Z error: aborting due to 2 previous errors
2020-04-10T16:43:33.7711564Z 
2020-04-10T16:43:33.7892683Z error: Could not document `alloc`.
2020-04-10T16:43:33.7892937Z 
2020-04-10T16:43:33.7893494Z Caused by:
2020-04-10T16:43:33.7897002Z   process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustdoc --edition=2018 --crate-type lib --crate-name alloc src/liballoc/lib.rs --target x86_64-unknown-linux-gnu -o /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/doc --cfg 'feature="compiler-builtins-c"' --error-format=json --json=diagnostic-rendered-ansi --markdown-css rust.css --markdown-no-toc --generate-redirect-pages -Z unstable-options --resource-suffix 1.44.0 --index-page /checkout/src/doc/index.md -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/release/deps --extern compiler_builtins=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps/libcompiler_builtins-22a504ac3e2c9700.rmeta --extern core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-std/x86_64-unknown-linux-gnu/release/deps/libcore-631ae9803e600fc3.rmeta` (exit code: 1)
2020-04-10T16:43:33.7909345Z 
2020-04-10T16:43:33.7909345Z 
2020-04-10T16:43:33.7911186Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "rustdoc" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--locked" "--color" "always" "--features" "panic-unwind backtrace compiler-builtins-c" "--manifest-path" "/checkout/src/libtest/Cargo.toml" "-p" "alloc" "--" "--markdown-css" "rust.css" "--markdown-no-toc" "--generate-redirect-pages" "-Z" "unstable-options" "--resource-suffix" "1.44.0" "--index-page" "/checkout/src/doc/index.md"
2020-04-10T16:43:33.7912835Z 
2020-04-10T16:43:33.7912936Z 
2020-04-10T16:43:33.7919813Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
2020-04-10T16:43:33.7920176Z Build completed unsuccessfully in 1:46:47
2020-04-10T16:43:33.7920176Z Build completed unsuccessfully in 1:46:47
2020-04-10T16:43:33.7972214Z == clock drift check ==
2020-04-10T16:43:33.7990560Z   local time: Fri Apr 10 16:43:33 UTC 2020
2020-04-10T16:43:33.8694741Z   network time: Fri, 10 Apr 2020 16:43:33 GMT
2020-04-10T16:43:35.4514034Z 
2020-04-10T16:43:35.4514034Z 
2020-04-10T16:43:35.4585907Z ##[error]Bash exited with code '1'.
2020-04-10T16:43:35.4601015Z ##[section]Finishing: Run build
2020-04-10T16:43:35.4649902Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/70967/merge to s
2020-04-10T16:43:35.4654787Z Task         : Get sources
2020-04-10T16:43:35.4655128Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-10T16:43:35.4655429Z Version      : 1.0.0
2020-04-10T16:43:35.4655641Z Author       : Microsoft
2020-04-10T16:43:35.4655641Z Author       : Microsoft
2020-04-10T16:43:35.4656135Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-04-10T16:43:35.4656713Z ==============================================================================
2020-04-10T16:43:35.8046847Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-04-10T16:43:35.8090412Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/70967/merge to s
2020-04-10T16:43:35.8176483Z Cleaning up task key
2020-04-10T16:43:35.8177795Z Start cleaning up orphan processes.
2020-04-10T16:43:35.8381165Z Terminate orphan process: pid (3870) (python)
2020-04-10T16:43:35.8628213Z ##[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)

@joshtriplett joshtriplett added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Apr 10, 2020
@joshtriplett
Copy link
Member

Tagging libs, and assigning to a random libs team member.

@BurntSushi
Copy link
Member

I'm generally not on the PR review rotation. r? @sfackler

Also, cc @RalfJung

@rust-highfive
Copy link
Contributor

The job x86_64-gnu-llvm-7 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.
2020-04-11T08:43:18.3844890Z ========================== Starting Command Output ===========================
2020-04-11T08:43:18.3847925Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/d8f8a74d-def4-4422-992e-1952e98e811e.sh
2020-04-11T08:43:18.3848251Z 
2020-04-11T08:43:18.3852842Z ##[section]Finishing: Disable git automatic line ending conversion
2020-04-11T08:43:18.3876423Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/70967/merge to s
2020-04-11T08:43:18.3880309Z Task         : Get sources
2020-04-11T08:43:18.3880675Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-11T08:43:18.3881028Z Version      : 1.0.0
2020-04-11T08:43:18.3881281Z Author       : Microsoft
---
2020-04-11T08:43:19.3805540Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-04-11T08:43:19.3812528Z ##[command]git config gc.auto 0
2020-04-11T08:43:19.3817199Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-04-11T08:43:19.3821526Z ##[command]git config --get-all http.proxy
2020-04-11T08:43:19.3828767Z ##[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/70967/merge:refs/remotes/pull/70967/merge
---
2020-04-11T08:45:29.5646765Z Looks like docker image is the same as before, not uploading
2020-04-11T08:45:37.7153498Z [CI_JOB_NAME=x86_64-gnu-llvm-7]
2020-04-11T08:45:37.7366003Z [CI_JOB_NAME=x86_64-gnu-llvm-7]
2020-04-11T08:45:37.7384414Z == clock drift check ==
2020-04-11T08:45:37.7395262Z   local time: Sat Apr 11 08:45:37 UTC 2020
2020-04-11T08:45:37.8219732Z   network time: Sat, 11 Apr 2020 08:45:37 GMT
2020-04-11T08:45:37.8244417Z Starting sccache server...
2020-04-11T08:45:37.8994294Z configure: processing command line
2020-04-11T08:45:37.8994542Z configure: 
2020-04-11T08:45:37.8995831Z configure: rust.dist-src        := False
---
2020-04-11T08:50:03.3637310Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-11T08:50:04.6012960Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-11T08:50:05.9449141Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-11T08:50:06.3912785Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-11T08:50:14.3125380Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-11T08:50:15.8023755Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-11T08:50:19.4525902Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-11T08:50:22.8045121Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-11T08:50:30.9064586Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-11T09:09:04.5549854Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-11T09:09:06.5973359Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-11T09:09:08.2853246Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-11T09:09:08.9992105Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-11T09:09:18.6021372Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-11T09:09:20.2441912Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-11T09:09:24.6097444Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-11T09:09:29.1697927Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-11T09:09:39.3549458Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-11T09:31:14.6022834Z .................................................................................................... 1600/9884
2020-04-11T09:31:20.1506412Z .................................................................................................... 1700/9884
2020-04-11T09:31:24.0062549Z .................................................................................................... 1800/9884
2020-04-11T09:31:31.7497796Z .................................................................................................... 1900/9884
2020-04-11T09:31:38.6123097Z ..i................................................................................................. 2000/9884
2020-04-11T09:31:44.1230718Z ............................................................................................iiiii... 2100/9884
2020-04-11T09:32:01.8001190Z .................................................................................................... 2300/9884
2020-04-11T09:32:03.6972953Z .................................................................................................... 2400/9884
2020-04-11T09:32:05.7472869Z .................................................................................................... 2500/9884
2020-04-11T09:32:10.8977704Z .................................................................................................... 2600/9884
---
2020-04-11T09:34:44.4938025Z .................................................................................................... 5100/9884
2020-04-11T09:34:51.1013126Z .................................................................................................... 5200/9884
2020-04-11T09:34:55.4564812Z ...........i........................................................................................ 5300/9884
2020-04-11T09:35:04.0700353Z .................................................................................................... 5400/9884
2020-04-11T09:35:08.2640334Z ii.ii........i...i.................................................................................. 5500/9884
2020-04-11T09:35:15.1439362Z .............................................i...................................................... 5700/9884
2020-04-11T09:35:24.6416981Z .................................................................ii................................. 5800/9884
2020-04-11T09:35:30.4152648Z ....i............................................................................................... 5900/9884
2020-04-11T09:35:35.0637931Z .................................................................................................... 6000/9884
2020-04-11T09:35:35.0637931Z .................................................................................................... 6000/9884
2020-04-11T09:35:43.3105256Z ..................................................................................................ii 6100/9884
2020-04-11T09:35:53.1067807Z ...i..ii...........i................................................................................ 6200/9884
2020-04-11T09:36:04.3868596Z .................................................................................................... 6400/9884
2020-04-11T09:36:07.1886629Z .................................................................................................... 6500/9884
2020-04-11T09:36:07.1886629Z .................................................................................................... 6500/9884
2020-04-11T09:36:17.6953611Z ............................i..ii................................................................... 6600/9884
2020-04-11T09:36:35.7714275Z .................................................................................................... 6800/9884
2020-04-11T09:36:37.5331741Z ............................i....................................................................... 6900/9884
2020-04-11T09:36:39.3356866Z .................................................................................................... 7000/9884
2020-04-11T09:36:41.2004965Z ...................................................................i................................ 7100/9884
---
2020-04-11T09:38:03.4489062Z .................................................................................................... 7800/9884
2020-04-11T09:38:06.7619157Z .................................................................................................... 7900/9884
2020-04-11T09:38:12.3743385Z .................................................................................................... 8000/9884
2020-04-11T09:38:18.1837109Z ................................i................................................................... 8100/9884
2020-04-11T09:38:25.4893880Z ................................................................................iiiiii.iiiii.i...... 8200/9884
2020-04-11T09:38:38.7493216Z ..........................i......i.................................................................. 8400/9884
2020-04-11T09:38:42.1349198Z .................................................................................................... 8500/9884
2020-04-11T09:38:51.6877059Z .................................................................................................... 8600/9884
2020-04-11T09:39:02.1183928Z .................................................................................................... 8700/9884
---
2020-04-11T09:41:03.6610968Z  finished in 6.647
2020-04-11T09:41:03.6758501Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-04-11T09:41:03.8570764Z 
2020-04-11T09:41:03.8571145Z running 185 tests
2020-04-11T09:41:06.1992485Z iiii......i............ii.i..iiii....i....i...........i............i..i..................i....i..... 100/185
2020-04-11T09:41:08.3846882Z .......i.i.i...iii..iiiiiiiiiiiiiiii.......................iii...............ii......
2020-04-11T09:41:08.3849998Z 
2020-04-11T09:41:08.3854090Z  finished in 4.709
2020-04-11T09:41:08.3860116Z Suite("src/test/codegen-units") not skipped for "bootstrap::test::CodegenUnits" -- not in ["src/tools/tidy"]
2020-04-11T09:41:08.4021059Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-04-11T09:41:10.2157368Z Suite("src/test/assembly") not skipped for "bootstrap::test::Assembly" -- not in ["src/tools/tidy"]
2020-04-11T09:41:10.2326511Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-04-11T09:41:10.3620310Z 
2020-04-11T09:41:10.3620687Z running 9 tests
2020-04-11T09:41:10.3621925Z iiiiiiiii
2020-04-11T09:41:10.3625522Z 
2020-04-11T09:41:10.3629931Z  finished in 0.129
2020-04-11T09:41:10.3630952Z Suite("src/test/incremental") not skipped for "bootstrap::test::Incremental" -- not in ["src/tools/tidy"]
2020-04-11T09:41:10.3792102Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-04-11T09:41:27.3067038Z Suite("src/test/debuginfo") not skipped for "bootstrap::test::Debuginfo" -- not in ["src/tools/tidy"]
2020-04-11T09:41:27.3298682Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-04-11T09:41:27.4822848Z 
2020-04-11T09:41:27.4823296Z running 115 tests
2020-04-11T09:41:38.7435394Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii.........i.....i..i.......ii.i.ii.. 100/115
2020-04-11T09:41:40.2166387Z ...iiii.....ii.
2020-04-11T09:41:40.2172517Z 
2020-04-11T09:41:40.2172665Z  finished in 12.887
2020-04-11T09:41:40.2175164Z Suite("src/test/ui-fulldeps") not skipped for "bootstrap::test::UiFullDeps" -- not in ["src/tools/tidy"]
2020-04-11T09:41:40.2178518Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-04-11T09:51:57.1887130Z 
2020-04-11T09:51:57.1888093Z    Doc-tests core
2020-04-11T09:52:01.1344900Z 
2020-04-11T09:52:01.1345705Z running 2490 tests
2020-04-11T09:52:08.9233285Z ......iiiii......................................................................................... 100/2490
2020-04-11T09:52:16.6049607Z .....................................................................................ii............. 200/2490
2020-04-11T09:52:33.6081831Z ....................i............................................................................... 400/2490
2020-04-11T09:52:33.6081831Z ....................i............................................................................... 400/2490
2020-04-11T09:52:41.7352627Z ..........................................................................i..i..................iiii 500/2490
2020-04-11T09:52:54.9571077Z .................................................................................................... 700/2490
2020-04-11T09:53:01.8929809Z .................................................................................................... 800/2490
2020-04-11T09:53:08.8108932Z .................................................................................................... 900/2490
2020-04-11T09:53:15.8510469Z .................................................................................................... 1000/2490
---
2020-04-11T09:56:16.5350871Z 
2020-04-11T09:56:16.5351265Z running 1019 tests
2020-04-11T09:56:30.7931388Z i................................................................................................... 100/1019
2020-04-11T09:56:39.1649862Z .................................................................................................... 200/1019
2020-04-11T09:56:45.3189014Z ..................iii......i......i...i......i...................................................... 300/1019
2020-04-11T09:56:54.7283978Z ...................................................i....i......................................ii... 500/1019
2020-04-11T09:57:01.0174454Z .................................................................................................... 600/1019
2020-04-11T09:57:05.0963886Z .................................................................................................... 700/1019
2020-04-11T09:57:05.0963886Z .................................................................................................... 700/1019
2020-04-11T09:57:10.8342144Z .............................................iiii................................................... 800/1019
2020-04-11T09:57:22.5562448Z .................................................................................................... 900/1019
2020-04-11T09:57:27.6738989Z ...................................................................iiii............................. 1000/1019
2020-04-11T09:57:28.7473235Z test result: ok. 999 passed; 0 failed; 20 ignored; 0 measured; 0 filtered out
2020-04-11T09:57:28.7473700Z 
2020-04-11T09:57:28.7530544Z  finished in 137.296
2020-04-11T09:57:28.7538486Z Set({"src/libterm"}) not skipped for "bootstrap::test::Crate" -- not in ["src/tools/tidy"]
---
2020-04-11T10:00:06.1750440Z 
2020-04-11T10:00:06.1750952Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
2020-04-11T10:00:06.1751239Z 
2020-04-11T10:00:06.1805912Z  finished in 0.847
2020-04-11T10:00:06.1810647Z Set({"/checkout/src/librustc_query_system"}) not skipped for "bootstrap::test::CrateLibrustc" -- not in ["src/tools/tidy"]
2020-04-11T10:00:06.1834062Z Testing rustc_query_system stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-04-11T10:00:06.3521024Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-11T10:00:07.2283883Z      Running build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_query_system-1c2859d2f4a03ab3
2020-04-11T10:00:07.2310817Z 
2020-04-11T10:00:07.2311266Z running 0 tests
2020-04-11T10:00:07.2311401Z 
---
2020-04-11T10:12:02.5338209Z Set({"/checkout/src/librustc_parse"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
2020-04-11T10:12:02.5338984Z Set({"/checkout/src/librustc_passes"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
2020-04-11T10:12:02.5339762Z Set({"/checkout/src/librustc_plugin_impl"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
2020-04-11T10:12:02.5340561Z Set({"/checkout/src/librustc_privacy"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
2020-04-11T10:12:02.5341345Z Set({"/checkout/src/librustc_query_system"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
2020-04-11T10:12:02.5342938Z Set({"/checkout/src/librustc_save_analysis"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
2020-04-11T10:12:02.5343713Z Set({"/checkout/src/librustc_session"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
2020-04-11T10:12:02.5344552Z Set({"/checkout/src/librustc_span"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
2020-04-11T10:12:02.5345295Z Set({"/checkout/src/librustc_symbol_mangling"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
---
2020-04-11T10:12:12.8301493Z Rustbook (x86_64-unknown-linux-gnu) - edition-guide
2020-04-11T10:12:13.1598780Z Building stage0 tool linkchecker (x86_64-unknown-linux-gnu)
2020-04-11T10:12:13.2869990Z    Compiling linkchecker v0.1.0 (/checkout/src/tools/linkchecker)
2020-04-11T10:12:14.5524791Z     Finished release [optimized] target(s) in 1.39s
2020-04-11T10:12:17.3926128Z alloc/vec/struct.Vec.html:492: broken link - mem/union.MaybeUninit.html
2020-04-11T10:12:18.5183243Z std/vec/struct.Vec.html:492: broken link - mem/union.MaybeUninit.html
2020-04-11T10:12:20.3993855Z thread 'main' panicked at 'found some broken links', src/tools/linkchecker/main.rs:43:9
2020-04-11T10:12:20.4030609Z 
2020-04-11T10:12:20.4031061Z 
2020-04-11T10:12:20.4039055Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/linkchecker" "/checkout/obj/build/x86_64-unknown-linux-gnu/doc"
2020-04-11T10:12:20.4039761Z expected success, got: exit code: 101
2020-04-11T10:12:20.4039761Z expected success, got: exit code: 101
2020-04-11T10:12:20.4040743Z 
2020-04-11T10:12:20.4040875Z 
2020-04-11T10:12:20.4041462Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
2020-04-11T10:12:20.4041844Z Build completed unsuccessfully in 1:25:14
2020-04-11T10:12:20.4097084Z == clock drift check ==
2020-04-11T10:12:20.4111505Z   local time: Sat Apr 11 10:12:20 UTC 2020
2020-04-11T10:12:20.7309574Z   network time: Sat, 11 Apr 2020 10:12:20 GMT
2020-04-11T10:12:23.5675702Z 
2020-04-11T10:12:23.5675702Z 
2020-04-11T10:12:23.5740766Z ##[error]Bash exited with code '1'.
2020-04-11T10:12:23.5754593Z ##[section]Finishing: Run build
2020-04-11T10:12:23.5798780Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/70967/merge to s
2020-04-11T10:12:23.5803169Z Task         : Get sources
2020-04-11T10:12:23.5803450Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-11T10:12:23.5803726Z Version      : 1.0.0
2020-04-11T10:12:23.5803908Z Author       : Microsoft
2020-04-11T10:12:23.5803908Z Author       : Microsoft
2020-04-11T10:12:23.5804191Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-04-11T10:12:23.5804536Z ==============================================================================
2020-04-11T10:12:23.9685078Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-04-11T10:12:23.9722206Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/70967/merge to s
2020-04-11T10:12:23.9800601Z Cleaning up task key
2020-04-11T10:12:23.9802356Z Start cleaning up orphan processes.
2020-04-11T10:12:23.9970939Z Terminate orphan process: pid (4270) (python)
2020-04-11T10:12:24.0186946Z ##[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)

…g* Improve the explanation in the assertion* UB and memory leak notes
@rust-highfive
Copy link
Contributor

The job x86_64-gnu-llvm-7 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.
2020-04-11T10:18:59.5217781Z ========================== Starting Command Output ===========================
2020-04-11T10:18:59.5220333Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/302c5879-0e4f-40ab-b5ca-9327f04f0231.sh
2020-04-11T10:18:59.5220654Z 
2020-04-11T10:18:59.5225625Z ##[section]Finishing: Disable git automatic line ending conversion
2020-04-11T10:18:59.5246292Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/70967/merge to s
2020-04-11T10:18:59.5249940Z Task         : Get sources
2020-04-11T10:18:59.5250245Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-11T10:18:59.5250539Z Version      : 1.0.0
2020-04-11T10:18:59.5250741Z Author       : Microsoft
---
2020-04-11T10:19:00.5204430Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-04-11T10:19:00.5209749Z ##[command]git config gc.auto 0
2020-04-11T10:19:00.5213335Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-04-11T10:19:00.5216754Z ##[command]git config --get-all http.proxy
2020-04-11T10:19:00.5223720Z ##[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/70967/merge:refs/remotes/pull/70967/merge
---
2020-04-11T10:21:10.1822113Z Looks like docker image is the same as before, not uploading
2020-04-11T10:21:14.9686673Z [CI_JOB_NAME=x86_64-gnu-llvm-7]
2020-04-11T10:21:15.0017007Z [CI_JOB_NAME=x86_64-gnu-llvm-7]
2020-04-11T10:21:15.0052461Z == clock drift check ==
2020-04-11T10:21:15.0062836Z   local time: Sat Apr 11 10:21:15 UTC 2020
2020-04-11T10:21:15.2892751Z   network time: Sat, 11 Apr 2020 10:21:15 GMT
2020-04-11T10:21:15.2915104Z Starting sccache server...
2020-04-11T10:21:15.3784968Z configure: processing command line
2020-04-11T10:21:15.3785646Z configure: 
2020-04-11T10:21:15.3787602Z configure: rust.dist-src        := False
---
2020-04-11T10:27:01.1075492Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-11T10:27:02.7154775Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-11T10:27:04.4026146Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-11T10:27:06.9853122Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-11T10:27:15.6662157Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-11T10:27:19.8619377Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-11T10:27:24.7347958Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-11T10:27:29.2166291Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-11T10:27:38.0347034Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-11T10:52:14.9203116Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-11T10:52:16.9246587Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-11T10:52:19.1878530Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-11T10:52:21.9381810Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-11T10:52:32.5680916Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-11T10:52:37.1756379Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-11T10:52:42.9557542Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-11T10:52:48.8903758Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-11T10:52:59.8459650Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-11T11:20:43.6957263Z .................................................................................................... 1700/9886
2020-04-11T11:20:48.2296420Z .................................................................................................... 1800/9886
2020-04-11T11:20:57.5482719Z .................................................................................................... 1900/9886
2020-04-11T11:21:06.1102995Z ....i............................................................................................... 2000/9886
2020-04-11T11:21:12.6518966Z ..............................................................................................iiiii. 2100/9886
2020-04-11T11:21:34.6078087Z .................................................................................................... 2300/9886
2020-04-11T11:21:36.8047757Z .................................................................................................... 2400/9886
2020-04-11T11:21:39.3205508Z .................................................................................................... 2500/9886
2020-04-11T11:21:44.9374695Z .................................................................................................... 2600/9886
---
2020-04-11T11:24:49.0253490Z .................................................................................................... 5100/9886
2020-04-11T11:24:56.6746085Z .................................................................................................... 5200/9886
2020-04-11T11:25:02.1448271Z .............i...................................................................................... 5300/9886
2020-04-11T11:25:12.2942557Z .................................................................................................... 5400/9886
2020-04-11T11:25:17.5227526Z ..ii.ii........i...i................................................................................ 5500/9886
2020-04-11T11:25:25.3895312Z ...............................................i.................................................... 5700/9886
2020-04-11T11:25:36.1614783Z ...................................................................ii............................... 5800/9886
2020-04-11T11:25:42.6896077Z ......i............................................................................................. 5900/9886
2020-04-11T11:25:48.7609519Z .................................................................................................... 6000/9886
2020-04-11T11:25:48.7609519Z .................................................................................................... 6000/9886
2020-04-11T11:25:58.7636085Z .................................................................................................... 6100/9886
2020-04-11T11:26:10.8816096Z ii...i..ii...........i.............................................................................. 6200/9886
2020-04-11T11:26:27.3927850Z .................................................................................................... 6400/9886
2020-04-11T11:26:34.4600841Z .................................................................................................... 6500/9886
2020-04-11T11:26:34.4600841Z .................................................................................................... 6500/9886
2020-04-11T11:26:48.9824707Z ..............................i..ii................................................................. 6600/9886
2020-04-11T11:27:11.5319831Z .................................................................................................... 6800/9886
2020-04-11T11:27:13.7241256Z ..............................i..................................................................... 6900/9886
2020-04-11T11:27:15.8871683Z .................................................................................................... 7000/9886
2020-04-11T11:27:18.4110207Z .....................................................................i.............................. 7100/9886
---
2020-04-11T11:29:01.5119451Z .................................................................................................... 7800/9886
2020-04-11T11:29:05.7090339Z .................................................................................................... 7900/9886
2020-04-11T11:29:12.7727808Z .................................................................................................... 8000/9886
2020-04-11T11:29:20.0271867Z ..................................i................................................................. 8100/9886
2020-04-11T11:29:29.2892372Z ..................................................................................iiiiii.iiiii.i.... 8200/9886
2020-04-11T11:29:46.0768359Z ............................i......i................................................................ 8400/9886
2020-04-11T11:29:49.6661796Z .................................................................................................... 8500/9886
2020-04-11T11:30:01.4556057Z .................................................................................................... 8600/9886
2020-04-11T11:30:14.9851716Z .................................................................................................... 8700/9886
---
2020-04-11T11:32:47.5667516Z Suite("src/test/codegen") not skipped for "bootstrap::test::Codegen" -- not in ["src/tools/tidy"]
2020-04-11T11:32:47.5865751Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-04-11T11:32:47.8131682Z 
2020-04-11T11:32:47.8132381Z running 185 tests
2020-04-11T11:32:50.8915873Z iiii......i............ii.i..ii.ii...i....i...........i............i..i..................i....i..... 100/185
2020-04-11T11:32:53.7697644Z .......i.i.i...iii..iiiiiiiiiiiiiiii.......................iii...............ii......
2020-04-11T11:32:53.7700399Z 
2020-04-11T11:32:53.7706475Z  finished in 6.184
2020-04-11T11:32:53.7712388Z Suite("src/test/codegen-units") not skipped for "bootstrap::test::CodegenUnits" -- not in ["src/tools/tidy"]
2020-04-11T11:32:53.7908963Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-04-11T11:32:56.1303781Z Suite("src/test/assembly") not skipped for "bootstrap::test::Assembly" -- not in ["src/tools/tidy"]
2020-04-11T11:32:56.1500016Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-04-11T11:32:56.3197956Z 
2020-04-11T11:32:56.3198267Z running 9 tests
2020-04-11T11:32:56.3202252Z iiiiiiiii
2020-04-11T11:32:56.3203234Z 
2020-04-11T11:32:56.3203371Z  finished in 0.170
2020-04-11T11:32:56.3203961Z Suite("src/test/incremental") not skipped for "bootstrap::test::Incremental" -- not in ["src/tools/tidy"]
2020-04-11T11:32:56.3384365Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-04-11T11:33:17.7277738Z Suite("src/test/debuginfo") not skipped for "bootstrap::test::Debuginfo" -- not in ["src/tools/tidy"]
2020-04-11T11:33:17.7496352Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-04-11T11:33:17.9560249Z 
2020-04-11T11:33:17.9560789Z running 115 tests
2020-04-11T11:33:32.6186018Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii.........i.....i..i.......ii.i.ii.. 100/115
2020-04-11T11:33:34.5006125Z ...iiii.....ii.
2020-04-11T11:33:34.5007294Z 
2020-04-11T11:33:34.5013779Z  finished in 16.751
2020-04-11T11:33:34.5024699Z Suite("src/test/ui-fulldeps") not skipped for "bootstrap::test::UiFullDeps" -- not in ["src/tools/tidy"]
2020-04-11T11:33:34.5025358Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-04-11T11:46:47.4529997Z 
2020-04-11T11:46:47.4530823Z    Doc-tests core
2020-04-11T11:46:52.4716525Z 
2020-04-11T11:46:52.4717342Z running 2490 tests
2020-04-11T11:47:02.2655809Z ......iiiii......................................................................................... 100/2490
2020-04-11T11:47:11.6102045Z .....................................................................................ii............. 200/2490
2020-04-11T11:47:33.6246828Z ....................i............................................................................... 400/2490
2020-04-11T11:47:33.6246828Z ....................i............................................................................... 400/2490
2020-04-11T11:47:44.2266609Z ..........................................................................i..i..................iiii 500/2490
2020-04-11T11:48:01.6839948Z .................................................................................................... 700/2490
2020-04-11T11:48:10.5974041Z .................................................................................................... 800/2490
2020-04-11T11:48:19.4535518Z .................................................................................................... 900/2490
2020-04-11T11:48:28.2169526Z .................................................................................................... 1000/2490
---
2020-04-11T11:52:20.3862317Z 
2020-04-11T11:52:20.3961274Z running 1019 tests
2020-04-11T11:52:38.9356544Z i................................................................................................... 100/1019
2020-04-11T11:52:49.7919819Z .................................................................................................... 200/1019
2020-04-11T11:52:57.9637145Z ...................iii.....i......i...i......i...................................................... 300/1019
2020-04-11T11:53:10.9807117Z ...................................................i....i......................................ii... 500/1019
2020-04-11T11:53:19.5236186Z .................................................................................................... 600/1019
2020-04-11T11:53:24.8297102Z .................................................................................................... 700/1019
2020-04-11T11:53:24.8297102Z .................................................................................................... 700/1019
2020-04-11T11:53:32.5035017Z .............................................iiii................................................... 800/1019
2020-04-11T11:53:47.4020177Z .................................................................................................... 900/1019
2020-04-11T11:53:53.9050075Z ...................................................................iiii............................. 1000/1019
2020-04-11T11:53:55.2503311Z test result: ok. 999 passed; 0 failed; 20 ignored; 0 measured; 0 filtered out
2020-04-11T11:53:55.2503978Z 
2020-04-11T11:53:55.2628540Z  finished in 177.110
2020-04-11T11:53:55.2639075Z Set({"src/libterm"}) not skipped for "bootstrap::test::Crate" -- not in ["src/tools/tidy"]
---
2020-04-11T11:57:24.4944577Z 
2020-04-11T11:57:24.4945008Z test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
2020-04-11T11:57:24.4945628Z 
2020-04-11T11:57:24.5004125Z  finished in 1.015
2020-04-11T11:57:24.5005680Z Set({"/checkout/src/librustc_query_system"}) not skipped for "bootstrap::test::CrateLibrustc" -- not in ["src/tools/tidy"]
2020-04-11T11:57:24.5020590Z Testing rustc_query_system stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-04-11T11:57:24.7096302Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-11T11:57:25.7656778Z      Running build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release/deps/rustc_query_system-5f837e08d4fb7380
2020-04-11T11:57:25.7689744Z 
2020-04-11T11:57:25.7691064Z running 0 tests
2020-04-11T11:57:25.7691195Z 
---
2020-04-11T12:12:59.3394529Z Set({"/checkout/src/librustc_parse"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
2020-04-11T12:12:59.3395158Z Set({"/checkout/src/librustc_passes"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
2020-04-11T12:12:59.3395780Z Set({"/checkout/src/librustc_plugin_impl"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
2020-04-11T12:12:59.3396397Z Set({"/checkout/src/librustc_privacy"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
2020-04-11T12:12:59.3397037Z Set({"/checkout/src/librustc_query_system"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
2020-04-11T12:12:59.3398277Z Set({"/checkout/src/librustc_save_analysis"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
2020-04-11T12:12:59.3398926Z Set({"/checkout/src/librustc_session"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
2020-04-11T12:12:59.3399616Z Set({"/checkout/src/librustc_span"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
2020-04-11T12:12:59.3400293Z Set({"/checkout/src/librustc_symbol_mangling"}) not skipped for "bootstrap::doc::Rustc" -- not in ["src/tools/tidy"]
---
2020-04-11T12:13:12.0900780Z Rustbook (x86_64-unknown-linux-gnu) - edition-guide
2020-04-11T12:13:12.4845748Z Building stage0 tool linkchecker (x86_64-unknown-linux-gnu)
2020-04-11T12:13:12.6423132Z    Compiling linkchecker v0.1.0 (/checkout/src/tools/linkchecker)
2020-04-11T12:13:14.1464849Z     Finished release [optimized] target(s) in 1.65s
2020-04-11T12:13:17.6538111Z alloc/vec/struct.Vec.html:492: broken link - alloc/mem/union.MaybeUninit.html
2020-04-11T12:13:21.3896394Z thread 'main' panicked at 'found some broken links', src/tools/linkchecker/main.rs:43:9
2020-04-11T12:13:21.3928836Z 
2020-04-11T12:13:21.3928983Z 
2020-04-11T12:13:21.3937815Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/linkchecker" "/checkout/obj/build/x86_64-unknown-linux-gnu/doc"
2020-04-11T12:13:21.3938322Z expected success, got: exit code: 101
2020-04-11T12:13:21.3938322Z expected success, got: exit code: 101
2020-04-11T12:13:21.3938523Z 
2020-04-11T12:13:21.3938610Z 
2020-04-11T12:13:21.3982195Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
2020-04-11T12:13:21.3982545Z Build completed unsuccessfully in 1:50:16
2020-04-11T12:13:21.3988860Z == clock drift check ==
2020-04-11T12:13:21.4015986Z   local time: Sat Apr 11 12:13:21 UTC 2020
2020-04-11T12:13:21.7017947Z   network time: Sat, 11 Apr 2020 12:13:21 GMT
2020-04-11T12:13:23.2166447Z 
2020-04-11T12:13:23.2166447Z 
2020-04-11T12:13:23.2240912Z ##[error]Bash exited with code '1'.
2020-04-11T12:13:23.2256307Z ##[section]Finishing: Run build
2020-04-11T12:13:23.2304109Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/70967/merge to s
2020-04-11T12:13:23.2309247Z Task         : Get sources
2020-04-11T12:13:23.2309557Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-11T12:13:23.2310020Z Version      : 1.0.0
2020-04-11T12:13:23.2310223Z Author       : Microsoft
2020-04-11T12:13:23.2310223Z Author       : Microsoft
2020-04-11T12:13:23.2310954Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-04-11T12:13:23.2311340Z ==============================================================================
2020-04-11T12:13:23.5868132Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-04-11T12:13:23.5912681Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/70967/merge to s
2020-04-11T12:13:23.6008426Z Cleaning up task key
2020-04-11T12:13:23.6009765Z Start cleaning up orphan processes.
2020-04-11T12:13:23.6256224Z Terminate orphan process: pid (3770) (python)
2020-04-11T12:13:23.6543999Z ##[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)

@moshg
Copy link
Author

moshg commented Apr 12, 2020

@Centril Thank you for your review!

I cannot find broken links. How can I find them?

With python x.py doc no error occurs. What command do I have to do to get the same error as CI?

@sfackler
Copy link
Member

Rather than conflating unchecked indexing and conversion to MaybeUninit, how about a method like this?

impl<T> Vec<T> {
    /// Returns the vector's spare capacity as a mutable slice of maybe-uninitialized values.
    ///
    /// The length of the slice will be `self.capacity() - self.len()`.
    pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>] { ... }
}

@joelpalmer joelpalmer removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 21, 2020
@joelpalmer joelpalmer added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 21, 2020
@joelpalmer
Copy link

Ping from Triage: Hi @moshg - any updates?

@joelpalmer joelpalmer added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 30, 2020
@joelpalmer
Copy link

Ping from Triage: Closing due to inactivity. @moshg please reopen with updates. Thanks for the PR.

@joelpalmer joelpalmer closed this Apr 30, 2020
Manishearth added a commit to Manishearth/rust that referenced this pull request Aug 2, 2020
Add Vec::spare_capacity_mut

Returns the remaining spare capacity of the vector as a slice of `MaybeUninit<T>`.

As suggested by @sfackler in rust-lang#70967 (comment).

r? @sfackler
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. 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.

7 participants