rust/src/ci
bors 80fb3f3139 Auto merge of #74576 - myfreeweb:freebsd-sanitizers, r=oli-obk
Add sanitizer support on FreeBSD

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

Unfortunately, the sanitizers don't have proper support for versioned symbols (https://github.com/google/sanitizers/issues/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?
2020-08-15 11:38:24 +00:00
..
azure-pipelines Use --stage 2 explicitly in CI 2020-07-27 23:19:16 -04:00
docker Auto merge of #74576 - myfreeweb:freebsd-sanitizers, r=oli-obk 2020-08-15 11:38:24 +00:00
github-actions Update MinGW comments in ci.yml 2020-08-11 16:31:32 +02:00
scripts ci: avoid symlinking the build directory on self-hosted builders 2020-07-23 11:29:47 +02:00
cpu-usage-over-time.py remove unnecessary semicolons 2020-02-07 23:35:27 -05:00
init_repo.sh Remove src/llvm-emscripten submodule 2019-10-21 13:05:31 -07:00
publish_toolstate.sh more toolstate comments 2020-03-04 08:30:26 -08:00
run.sh ci: Update dist-{i686,x86_64}-linux to Debian 6 2020-07-15 10:00:06 -07:00
shared.sh ci: avoid symlinking the build directory on self-hosted builders 2020-07-23 11:29:47 +02:00