about summary refs log tree commit diff
path: root/Cargo.lock
AgeCommit message (Collapse)AuthorLines
2021-10-07Rollup merge of #89288 - rusticstuff:lld_wrapper, r=Mark-SimulacrumJubilee-0/+4
Wrapper for `-Z gcc-ld=lld` to invoke rust-lld with the correct flavor This PR adds an `lld-wrapper` tool which is installed as `ld` and `ld64` in `lib\rustlib\<host_target>\bin\gcc-ld` directory and whose sole purpose is to invoke `rust-lld` in the parent directory with the correct flavor. Lld decides which flavor to use from either the first two commandline arguments or from the name of the executable (`ld` for GNU/ld flavor, `ld64` for Darwin/Macos/ld64 flavor and so on). Symbolic links could not be used as they are not supported by rustup and on Windows. The wrapper replaces full copies of rust-lld which added some significant bloat. On UNIXish operating systems it exec rust-lld, on Windows it spawns it as a child process. Fixes #88869. r? ```@Mark-Simulacrum``` cc ```@nagisa``` ```@petrochenkov``` ```@1000teslas```
2021-10-07Add wrapper for -Z gcc-ld=lld to invoke rust-lld with the correct flavorHans Kratz-0/+4
The wrapper is installed as `ld` and `ld64` in the `lib\rustlib\<host_target>\bin\gcc-ld` directory and its sole purpose is to invoke `rust-lld` in the parent directory with the correct flavor.
2021-10-07Rollup merge of #89461 - crlf0710:dyn_upcasting_lint, r=nikomatsakisGuillaume Gomez-0/+1
Add `deref_into_dyn_supertrait` lint. Initial implementation of #89460. Resolves #89190. Maybe also worth a beta backport if necessary. r? `@nikomatsakis`
2021-10-06Rollup merge of #89531 - devnexen:stack_overflow_bsd_libc_upd, r=dtolnayManish Goregaokar-2/+2
library std, libc dependency update to solve #87528 build.
2021-10-05Auto merge of #89363 - oli-obk:in_tracing_we_trust, r=Mark-Simulacrumbors-6/+6
Fix performance regression with #[instrument] linked tracing PR: https://github.com/tokio-rs/tracing/pull/1600 regression introduced by #89048
2021-10-05Auto merge of #89266 - cjgillot:session-ich, r=michaelwoeristerbors-0/+11
Move ICH to rustc_query_system Based on https://github.com/rust-lang/rust/pull/89183 The StableHashingContext does not need to be in rustc_middle. This PR moves it to rustc_query_system. This will avoid a dependency between rustc_ast_lowering and rustc_middle in https://github.com/rust-lang/rust/pull/89124.
2021-10-05library std, libc dependency updateDavid Carlier-2/+2
to solve #87528 build.
2021-10-04update MiriRalf Jung-18/+14
2021-10-03Remove re-export.Camille GILLOT-0/+6
2021-10-03Move ICH to rustc_query_system.Camille GILLOT-0/+4
2021-10-03Move rustc_middle::middle::cstore to rustc_session.Camille GILLOT-0/+1
2021-10-03Add `deref_into_dyn_supertrait` lint.Charles Lew-0/+1
2021-10-02Bump tracing to get the instrumentation perf improvementOli Scherer-6/+6
2021-10-01Rollup merge of #87868 - Kixiron:packing-on-the-pounds, r=eddybManish Goregaokar-5/+16
Added -Z randomize-layout flag An implementation of #77316, it currently randomly shuffles the fields of `repr(rust)` types based on their `DefPathHash` r? ``@eddyb``
2021-09-30Implemented -Z randomize-layoutChase Wilson-5/+16
2021-09-30Move EncodedMetadata to rustc_metadata.Camille GILLOT-0/+1
2021-09-22Update cargoEric Huss-2/+2
2021-09-20Update odht crate to 0.3.0Michael Woerister-2/+2
This version of odht contains a potential fix for #89085.
2021-09-18Update cargoEric Huss-2/+2
2021-09-18Auto merge of #82183 - michaelwoerister:lazier-defpathhash-loading2, ↵bors-0/+11
r=wesleywiser Simplify lazy DefPathHash decoding by using an on-disk hash table. This PR simplifies the logic around mapping `DefPathHash` values encountered during incremental compilation to valid `DefId`s in the current session. It is able to do so by using an on-disk hash table encoding that allows for looking up values directly, i.e. without deserializing the entire table. The main simplification comes from not having to keep track of `DefPathHashes` being used during the compilation session.
2021-09-17Auto merge of #88956 - ehuss:update-cargo, r=ehussbors-3/+3
Update cargo 13 commits in e515c3277bf0681bfc79a9e763861bfe26bb05db..33ee5f82edb50af87b952c5b28de0f5fb41ebf18 2021-09-08 14:32:15 +0000 to 2021-09-17 13:51:54 +0000 - Update curl-sys (rust-lang/cargo#9917) - Bump Cargo's curl requirement to 7.79.0 (rust-lang/cargo#9914) - Revert "When a dependency does not have a version, git or path, fails directly" (rust-lang/cargo#9911) - Add some contributor docs for debugging testsuite tests. (rust-lang/cargo#9904) - Fix warnings when documenting with `--document-private-items` (rust-lang/cargo#9903) - Improve "wrong output" error. (rust-lang/cargo#9905) - Fix warnings from better precision of `dead_code` lint (rust-lang/cargo#9906) - Bump to 0.58.0, update changelog (rust-lang/cargo#9900) - Fix rustc --profile=dev unstable check. (rust-lang/cargo#9898) - config.md: fix typo (rust-lang/cargo#9896) - Enable some tests on windows. (rust-lang/cargo#9893) - Enable strip test on macos. (rust-lang/cargo#9889) - Fix `cargo fix --edition` on stable. (rust-lang/cargo#9890)
2021-09-17Update cargoEric Huss-3/+3
2021-09-17Update odht to 0.2.1Michael Woerister-2/+2
2021-09-15Auto merge of #87867 - bjorn3:unique_type_id_interner, r=wesleywiserbors-0/+1
Use a separate interner type for UniqueTypeId Using symbol::Interner makes it very easy to mixup UniqueTypeId symbols with the global interner. In fact the Debug implementation of UniqueTypeId did exactly this. Using a separate interner type also avoids prefilling the interner with unused symbols and allow for optimizing the symbol interner for parallel access without negatively affecting the single threaded module codegen.
2021-09-14Use on-disk-hash-table format for DefPathHashMap in hir::definitions.Michael Woerister-0/+11
2021-09-13Use a separate interner type for UniqueTypeIdbjorn3-0/+1
Using symbol::Interner makes it very easy to mixup UniqueTypeId symbols with the global interner. In fact the Debug implementation of UniqueTypeId did exactly this. Using a separate interner type also avoids prefilling the interner with unused symbols and allow for optimizing the symbol interner for parallel access without negatively affecting the single threaded module codegen.
2021-09-09Update lockfileSamuel E. Moelius III-31/+8
2021-09-08Auto merge of #88615 - flip1995:clippyup, r=Manishearthbors-11/+10
Update Clippy r? `@Manishearth`
2021-09-08Auto merge of #80522 - cjgillot:borrowcrate, r=oli-obkbors-17/+102
Split rustc_mir The `rustc_mir` crate is the second largest in the compiler. This PR splits it up into 5 crates: - rustc_borrowck; - rustc_const_eval; - rustc_mir_dataflow; - rustc_mir_transform; - rustc_monomorphize.
2021-09-08Update Cargo.lockflip1995-11/+10
2021-09-07Rename rustc_mir to rustc_const_eval.Camille GILLOT-28/+28
2021-09-07Move the dataflow framework to its own crate.Camille GILLOT-5/+26
2021-09-07Move monomorphize code to its own crate.Camille GILLOT-0/+17
2021-09-07Move rustc_mir::transform to rustc_mir_transform.Camille GILLOT-2/+24
2021-09-07Move rustc_mir::borrow_check to new crate rustc_borrowck.Camille GILLOT-2/+27
2021-09-06Auto merge of #88692 - hyd-dev:miri, r=RalfJungbors-2/+25
Update Miri Fixes #88671. r? `@RalfJung`
2021-09-07Update `Cargo.lock`hyd-dev-2/+25
2021-09-06Auto merge of #88362 - pietroalbini:bump-stage0, r=Mark-Simulacrumbors-0/+13
Pin bootstrap checksums and add a tool to update it automatically :warning: :warning: This is just a proactive hardening we're performing on the build system, and it's not prompted by any known compromise. If you're aware of security issues being exploited please [check out our responsible disclosure page](https://www.rust-lang.org/policies/security). :warning: :warning: --- This PR aims to improve Rust's supply chain security by pinning the checksums of the bootstrap compiler downloaded by `x.py`, preventing a compromised `static.rust-lang.org` from affecting building the compiler. The checksums are stored in `src/stage0.json`, which replaces `src/stage0.txt`. This PR also adds a tool to automatically update the bootstrap compiler. The changes in this PR were originally discussed in [Zulip](https://zulip-archive.rust-lang.org/stream/241545-t-release/topic/pinning.20stage0.20hashes.html). ## Potential attack Before this PR, an attacker who wanted to compromise the bootstrap compiler would "just" need to: 1. Gain write access to `static.rust-lang.org`, either by compromising DNS or the underlying storage. 2. Upload compromised binaries and corresponding `.sha256` files to `static.rust-lang.org`. There is no signature verification in `x.py` as we don't want the build system to depend on GPG. Also, since the checksums were not pinned inside the repository, they were downloaded from `static.rust-lang.org` too: this only protected from accidental changes in `static.rust-lang.org` that didn't change the `*.sha256` files. The attack would allow the attacker to compromise past and future invocations of `x.py`. ## Mitigations introduced in this PR This PR adds pinned checksums for all the bootstrap components in `src/stage0.json` instead of downloading the checksums from `static.rust-lang.org`. This changes the attack scenario to: 1. Gain write access to `static.rust-lang.org`, either by compromising DNS or the underlying storage. 2. Upload compromised binaries to `static.rust-lang.org`. 3. Land a (reviewed) change in the `rust-lang/rust` repository changing the pinned hashes. Even with a successful attack, existing clones of the Rust repository won't be affected, and once the attack is detected reverting the pinned hashes changes should be enough to be protected from the attack. This also enables further mitigations to be implemented in following PRs, such as verifying signatures when pinning new checksums (removing the trust on first use aspect of this PR) and adding a check in CI making sure a PR updating the checksum has not been tampered with (see the future improvements section). ## Additional changes There are additional changes implemented in this PR to enable the mitigation: * The `src/stage0.txt` file has been replaced with `src/stage0.json`. The reasoning for the change is that there is existing tooling to read and manipulate JSON files compared to the custom format we were using before, and the slight challenge of manually editing JSON files (no comments, no trailing commas) are not a problem thanks to the new `bump-stage0`. * A new tool has been added to the repository, `bump-stage0`. When invoked, the tool automatically calculates which release should be used as the bootstrap compiler given the current version and channel, gathers all the relevant checksums and updates `src/stage0.json`. The tool can be invoked by running: ``` ./x.py run src/tools/bump-stage0 ``` * Support for downloading releases from `https://dev-static.rust-lang.org` has been removed, as it's not possible to verify checksums there (it's customary to replace existing artifacts there if a rebuild is warranted). This will require a change to the release process to avoid bumping the bootstrap compiler on beta before the stable release. ## Future improvements * Add signature verification as part of `bump-stage0`, which would require the attacker to also obtain the release signing keys in order to successfully compromise the bootstrap compiler. This would be fine to add now, as the burden of installing the tool to verify signatures would only be placed on whoever updates the bootstrap compiler, instead of everyone compiling Rust. * Add a check on CI that ensures the checksums in `src/stage0.json` are the expected ones. If a PR changes the stage0 file CI should also run the `bump-stage0` tool and fail if the output in CI doesn't match the committed file. This prevents the PR author from tweaking the output of the tool manually, which would otherwise be close to impossible for a human to detect. * Automate creating the PRs bumping the bootstrap compiler, by setting up a scheduled job in GitHub Actions that runs the tool and opens a PR. * Investigate whether a similar mitigation can be done for "download from CI" components like the prebuilt LLVM. r? `@Mark-Simulacrum`
2021-09-02Auto merge of #87114 - cjgillot:abilint, r=estebankbors-0/+1
Lint missing Abi in ast validation instead of lowering.
2021-08-31Auto merge of #88506 - Mark-Simulacrum:fix-rlibs, r=ehussbors-2/+2
Fix loading large rlibs Bumps object crate to permit parsing archives with 64-bit table entries. These are primarily encountered when there's more than 4GB of archive data. cc https://github.com/gimli-rs/object/issues/365 Helps with https://github.com/rust-lang/rust/issues/88351, but will also need a beta backport r? `@ehuss` (mostly for the test)
2021-08-31Lint Abi in ast validation.Camille GILLOT-0/+1
2021-08-31Rollup merge of #88503 - m-ou-se:array-into-inter-ambiguous, r=cjgillotMara Bos-0/+1
Warn when [T; N].into_iter() is ambiguous in the new edition. Fixes https://github.com/rust-lang/rust/issues/88475 In https://github.com/rust-lang/rust/issues/88475, a situation was found where `[T; N].into_iter()` becomes *ambiguous* in the new edition. This is different than the case where `(&[T; N]).into_iter()` resolves differently, which was the only case handled by the `array_into_iter` lint. This is almost identical to the new-traits-in-the-prelude problem. Effectively, due to the array-into-iter hack disappearing in Rust 2021, we effectively added `IntoIterator` to the 'prelude' in Rust 2021 specifically for arrays. This modifies the prelude collisions lint to detect that case and emit a `array_into_iter` lint in that case.
2021-08-30Fix loading large rlibsMark Rousskov-2/+2
Bumps object crate to permit parsing archives with 64-bit table entries. These are primarily encountered when there's more than 4GB of archive data.
2021-08-30Warn when [T; N].into_iter() is ambiguous in the new edition.Mara Bos-0/+1
2021-08-30Auto merge of #87680 - mati865:stacker-psm-update, r=Mark-Simulacrum,nagisabors-5/+5
Update stacker and psm crates Primarily to include https://github.com/rust-lang/stacker/pull/54
2021-08-29Rollup merge of #88396 - klensy:bump-deps-vuln, r=Mark-SimulacrumGuillaume Gomez-6/+6
Bump vulnerable crates crossbeam-deque v0.7.3 -> v0.7.4: https://rustsec.org/advisories/RUSTSEC-2021-0093 https://github.com/crossbeam-rs/crossbeam/pull/728/files openssl-src v111.15.0+1.1.1k -> v111.16.0+1.1.1l: https://rustsec.org/advisories/RUSTSEC-2021-0097 https://rustsec.org/advisories/RUSTSEC-2021-0098 https://www.openssl.org/news/vulnerabilities-1.1.1.html tar v0.4.35 -> v0.4.37: https://rustsec.org/advisories/RUSTSEC-2021-0080 updated to 0.4.37 as there breaking change in 0.4.36: https://github.com/alexcrichton/tar-rs/pull/260
2021-08-28Treat macros as HIR itemsinquisitivecrystal-0/+1
2021-08-28Update stacker and psm cratesMateusz Mikuła-5/+5
2021-08-27crossbeam-deque v0.7.3 -> v0.7.4:klensy-6/+6
https://rustsec.org/advisories/RUSTSEC-2021-0093 https://github.com/crossbeam-rs/crossbeam/pull/728/files openssl-src v111.15.0+1.1.1k -> v111.16.0+1.1.1l: https://rustsec.org/advisories/RUSTSEC-2021-0097 https://rustsec.org/advisories/RUSTSEC-2021-0098 https://www.openssl.org/news/vulnerabilities-1.1.1.html tar v0.4.35 -> v0.4.37: https://rustsec.org/advisories/RUSTSEC-2021-0080 updated to 0.4.37 as there breaking change in 0.4.36: https://github.com/alexcrichton/tar-rs/pull/260
2021-08-26Update cargoEric Huss-2/+2