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 4 pull requests #74987

Closed
wants to merge 9 commits into from

Conversation

Manishearth
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

Lezzz and others added 9 commits July 30, 2020 23:33
Unfortunately, sanitizers do not support versioned symbols[1],
so they break filesystem access via the legacy, pre-ino64 ABI.

To use sanitizers on FreeBSD >= 12, we need to build the libc
crate with LIBC_CI=1 to use the new ABI -- including the libc
used for std. But that removes the st_lspare field std was
expecting for the deprecated metadata extension.

Add a way to skip that field to allow the build to work.

[1]: google/sanitizers#628
…-obk

Add sanitizer support on FreeBSD

Restarting rust-lang#47337. Everything is better now, no more weird llvm problems, well not everything:

Unfortunately, the sanitizers don't have proper support for versioned symbols (google/sanitizers#628), so `libc`'s usage of `stat@FBSD_1.0` and so on explodes, e.g. in calling `std::fs::metadata`.

Building std (now easy thanks to cargo `-Zbuild-std`) and libc with `freebsd12/13` config via the `LIBC_CI=1` env variable is a good workaround…

```
LIBC_CI=1 RUSTFLAGS="-Z sanitizer=address" cargo +san-test -Zbuild-std run --target x86_64-unknown-freebsd --verbose
```

…*except* std won't build because there's no `st_lspare` in the ino64 version of the struct, so an std patch is required:

```diff
--- i/src/libstd/os/freebsd/fs.rs
+++ w/src/libstd/os/freebsd/fs.rs
@@ -66,8 +66,6 @@ pub trait MetadataExt {
     fn st_flags(&self) -> u32;
     #[stable(feature = "metadata_ext2", since = "1.8.0")]
     fn st_gen(&self) -> u32;
-    #[stable(feature = "metadata_ext2", since = "1.8.0")]
-    fn st_lspare(&self) -> u32;
 }

 #[stable(feature = "metadata_ext", since = "1.1.0")]
@@ -136,7 +134,4 @@ impl MetadataExt for Metadata {
     fn st_flags(&self) -> u32 {
         self.as_inner().as_inner().st_flags as u32
     }
-    fn st_lspare(&self) -> u32 {
-        self.as_inner().as_inner().st_lspare as u32
-    }
 }
```

I guess std could like.. detect that `libc` isn't built for the old ABI, and replace the implementation of `st_lspare` with a panic?
Rename HAIR to THIR (Typed HIR).

r? @nikomatsakis

Originally suggested by @eddyb
Remove `linked_list_extras` methods.

Removing these in favor of the `Cursor` API in rust-lang#58533 .
Closes rust-lang#27794.

r? @Amanieu
…Mark-Simulacrum

1.45.2 release notes

(for master)

cc rust-lang#74958
@Manishearth
Copy link
Member Author

@rustbot modify labels: +rollup
@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Jul 31, 2020

📌 Commit c6af255 has been approved by Manishearth

@rustbot rustbot added the rollup A PR which is a rollup label Jul 31, 2020
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 31, 2020
@bors
Copy link
Contributor

bors commented Jul 31, 2020

⌛ Testing commit c6af255 with merge ef91b89cebd5600951c9f7d3991cb581ac8124f8...

@bors
Copy link
Contributor

bors commented Jul 31, 2020

💔 Test failed - checks-actions

@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 Jul 31, 2020
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu 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.
skip untracked path cpu-usage.csv during rustfmt invocations
skip untracked path src/doc/book/ during rustfmt invocations
skip untracked path src/doc/rust-by-example/ during rustfmt invocations
skip untracked path src/llvm-project/ during rustfmt invocations
Diff in /checkout/library/std/src/os/freebsd/fs.rs at line 79:
         #[cfg(freebsd12)]
         panic!("as_raw_stat not supported with FreeBSD 12 ABI");
         #[cfg(not(freebsd12))]
-        unsafe { &*(self.as_inner().as_inner() as *const libc::stat as *const raw::stat) }
Running `"/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/rustfmt" "--config-path" "/checkout" "--edition" "2018" "--unstable-features" "--skip-children" "--check" "/checkout/library/std/src/os/freebsd/fs.rs"` failed.
+        unsafe {
If you're running `tidy`, try again with `--bless`. Or, if you just want to format code, run `./x.py fmt` instead.
+            &*(self.as_inner().as_inner() as *const libc::stat as *const raw::stat)
     }
     }
     fn st_dev(&self) -> u64 {
         self.as_inner().as_inner().st_dev as u64
Diff in /checkout/library/std/src/os/freebsd/fs.rs at line 144:
     fn st_lspare(&self) -> u32 {
         #[cfg(freebsd12)]
         panic!("st_lspare not supported with FreeBSD 12 ABI");
+        #[cfg(not(freebsd12))]
         #[cfg(not(freebsd12))]
         self.as_inner().as_inner().st_lspare as u32
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap --stage 2 test
Build completed unsuccessfully in 0:00:36
== clock drift check ==
  local time: Fri Jul 31 20:12:27 UTC 2020
  local time: Fri Jul 31 20:12:27 UTC 2020
  network time: Fri, 31 Jul 2020 20:12:27 GMT
== end clock drift check ==
##[error]Process completed with exit code 1.
Terminate orphan process: pid (14790) (node)
Terminate orphan process: pid (14818) (python)

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)

@bors
Copy link
Contributor

bors commented Jul 31, 2020

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

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.

8 participants