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

Rollup of 15 pull requests #55990

Closed
wants to merge 51 commits into from
Closed

Conversation

pietroalbini
Copy link
Member

@pietroalbini pietroalbini commented Nov 15, 2018

Successful merges:

Failed merges:

r? @ghost

RalfJung and others added 30 commits November 4, 2018 11:23
… the same ABI

This is supposed to fix the performence regression of using MaybeUninit in
rust-lang#54668
Just running RustFmt on upvar.rs
`concurrent_recv_timeout_and_upgrade` reproduces a problem 100%
times on my MacBook with command:

```
./x.py test --stage 0 ./src/test/run-pass/mpsc_stress.rs
```

Thus it is commented out.

Other tests cases were useful for catching another test cases
which may arise during the fix.

This diff is a part of my previous rewrite attempt: rust-lang#42883

CC rust-lang#39364
Since SystemTime is opaque there is no way to check if the result
of an addition will be in bounds. That makes the Add<Duration>
trait completely unusable with untrusted data. This is a big problem
because adding a Duration to UNIX_EPOCH is the standard way of
constructing a SystemTime from a unix timestamp.

This commit implements checked_add_duration(&self, &Duration) -> Option<SystemTime>
for std::time::SystemTime and as a prerequisite also for all platform
specific time structs. This also led to the refactoring of many
add_duration(&self, &Duration) -> SystemTime functions to avoid
redundancy (they now unwrap the result of checked_add_duration).

Some basic unit tests for the newly introduced function were added
too.
Refactoring out the HirId of the UpvarId in another struct.
@bors
Copy link
Contributor

bors commented Nov 16, 2018

⌛ Testing commit a4f2eee4fda9de5d43d1ac46397e1833f83242d0 with merge a95f6705e1c56218950f645cd91a80470b1030aa...

@bors
Copy link
Contributor

bors commented Nov 16, 2018

💔 Test failed - status-appveyor

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 16, 2018
@ljedrz
Copy link
Contributor

ljedrz commented Nov 16, 2018

@pietroalbini this could be caused by #55871; while I don't see why, an earlier PR containing a broader version of that commit was hitting LLVM OOM.

miri enum discriminant handling: Fix treatment of pointers, better error when it is undef

r? @oli-obk
Make miri value visitor usfeful for mutation

This is based on top of rust-lang#55716, [click here](RalfJung/rust@escape-to-raw...RalfJung:mut-visitor) for just the new commits.

r? @oli-obk
Add placeholder types

Fixes rust-lang#48696 (handle universes in canonicalization of type inference vars), and fixes rust-lang#55098.
save-analysis: be even more aggressive about ignorning macro-generated defs

r? @eddyb
…edicate_walk_tys, r=oli-obk

ty: return impl Iterator from Predicate::walk_tys

Fixes the lazyboye `FIXME` by returning a custom `Iterator` as intended by the original author of the function.

It is indeed a bit convoluted, so I'm ok with not changing this if perf results are not favourable enough. Also happy to adjust any names if need be.
…xcrichton

Update to Clang 7 on CI.

Handles Linux and macOS. Windows seems to already have been updated.

r? @Mark-Simulacrum
cc @rust-lang/infra
…llaumeGomez

rustdoc: properly calculate spans for intra-doc link resolution errors

Fixes rust-lang#55723

When rustdoc is reporting a resolution error for intra-doc links, it needs to convert a span from one relative to the *markdown* (as the links are only found on the final markdown text) to one relative to the *source code* (as the error reporting is meant to show where the line is in the source, so the user can fix it). However, a calculation for how much "offset" to apply had a subtle error: it trimmed the whole line when attempting to account for leading indentation. This caused it to add in *trailing* whitespace into this calculation, which created an incorrect span.

In a lot of situations, this isn't a problem - the span will be shifted in the code slightly, but the warning will still be displayed and mostly legible. However, there is one important situation where this can cause an ICE: multi-byte codepoints. If a shifted span now has a starting point in the middle of a multi-byte codepoint, libsyntax will panic when trying to track what source item it corresponds to. This flew under our radar because trailing whitespace and multi-byte codepoints are both situations that we don't run into in the compiler repo.

(There is one more situation where this can error, that will be much harder to fix: block-style doc comments. Lines in a block-style doc comment have a zero-or-more (usually one) character offset per line, causing this calculation to be way off. I'm punting that to another issue, though...)
Stress test for MPSC

`concurrent_recv_timeout_and_upgrade` reproduces a problem 100%
times on my MacBook with command:

```
./x.py test --stage 0 ./src/test/run-pass/mpsc_stress.rs
```

Thus it is commented out.

Other tests cases were useful for catching another test cases
which may arise during the fix.

This diff is a part of my previous rewrite attempt: rust-lang#42883

CC rust-lang#39364
@pietroalbini pietroalbini changed the title Rollup of 16 pull requests Rollup of 15 pull requests Nov 16, 2018
@pietroalbini
Copy link
Member Author

Removed #55871

@bors r+ p=15

@bors
Copy link
Contributor

bors commented Nov 16, 2018

📌 Commit 443e50c has been approved by pietroalbini

@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 Nov 16, 2018
@bors
Copy link
Contributor

bors commented Nov 16, 2018

⌛ Testing commit 443e50c with merge ae830556df6ceed73d6e15404bc120d47dfa0470...

@bors
Copy link
Contributor

bors commented Nov 16, 2018

💔 Test failed - status-travis

@rust-highfive
Copy link
Collaborator

The job dist-various-1 of your PR failed on Travis (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.
[01:17:07]    Compiling panic_unwind v0.0.0 (/checkout/src/libpanic_unwind)
[01:17:07] [RUSTC-TIMING] panic_unwind test:false 0.280
[01:17:07] warning: dropping unsupported crate type `dylib` for target `x86_64-unknown-redox`
[01:17:07] 
[01:17:11] error[E0599]: no method named `map` found for type `sys::redox::time::Timespec` in the current scope
[01:17:11]    --> libstd/sys/redox/time.rs:193:36
[01:17:11] 21  | struct Timespec {
[01:17:11] 21  | struct Timespec {
[01:17:11]     | --------------- method `map` not found for this
[01:17:11] ...
[01:17:11] 193 |         self.t.add_duration(other).map(|t| SystemTime { t })
[01:17:11]     |
[01:17:11]     = note: the method `map` exists but the following trait bounds were not satisfied:
[01:17:11]     = note: the method `map` exists but the following trait bounds were not satisfied:
[01:17:11]             `&mut sys::redox::time::Timespec : core::iter::Iterator`
[01:17:11]     = note: the following trait defines an item `map`, perhaps you need to implement it:
[01:17:11]             candidate #1: `core::iter::Iterator`
[01:17:11] 
[01:17:11] error: aborting due to previous error
---
travis_time:end:04468ea8:start=1542377798971280896,finish=1542377798980624878,duration=9343982
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:00febc62
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:0147cdf0
travis_time:start:0147cdf0
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:1cf88c40
$ dmesg | grep -i kill

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 @TimNN. (Feature Requests)

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 16, 2018
@pietroalbini pietroalbini deleted the rollup branch November 16, 2018 19:55
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.