]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoReplace all //error-pattern comments with strict syntax and fix other comments in...
Oli Scherer [Tue, 5 Jul 2022 09:15:22 +0000 (09:15 +0000)]
Replace all //error-pattern comments with strict syntax and fix other comments in the same files

2 years agoImplement strict comment parsing for ui tests
Oli Scherer [Tue, 5 Jul 2022 09:08:00 +0000 (09:08 +0000)]
Implement strict comment parsing for ui tests

2 years agoAuto merge of #2345 - RalfJung:rustup, r=RalfJung
bors [Fri, 8 Jul 2022 00:13:26 +0000 (00:13 +0000)]
Auto merge of #2345 - RalfJung:rustup, r=RalfJung

rustup

2 years agorustup
Ralf Jung [Fri, 8 Jul 2022 00:12:30 +0000 (20:12 -0400)]
rustup

2 years agoAuto merge of #2343 - RalfJung:comment, r=RalfJung
bors [Thu, 7 Jul 2022 12:20:53 +0000 (12:20 +0000)]
Auto merge of #2343 - RalfJung:comment, r=RalfJung

fix comment in ./miri

pointed out in https://github.com/rust-lang/miri/pull/2288#discussion_r915445912

2 years agofix comment in ./miri
Ralf Jung [Thu, 7 Jul 2022 12:20:24 +0000 (08:20 -0400)]
fix comment in ./miri

2 years agoAuto merge of #2342 - RalfJung:dead-opt, r=RalfJung
bors [Thu, 7 Jul 2022 11:43:38 +0000 (11:43 +0000)]
Auto merge of #2342 - RalfJung:dead-opt, r=RalfJung

remove a dead optimization

This became dead code when I removed "Untagged".

2 years agoremove a dead optimization
Ralf Jung [Thu, 7 Jul 2022 11:42:31 +0000 (07:42 -0400)]
remove a dead optimization

2 years agoAuto merge of #2314 - RalfJung:unsized, r=RalfJung
bors [Thu, 7 Jul 2022 02:55:28 +0000 (02:55 +0000)]
Auto merge of #2314 - RalfJung:unsized, r=RalfJung

adjust for removed unsized_locals

The Miri side of https://github.com/rust-lang/rust/pull/98831

2 years agorustup
Ralf Jung [Thu, 7 Jul 2022 01:45:47 +0000 (21:45 -0400)]
rustup

2 years agoadjust code for copy_op changes
Ralf Jung [Sun, 3 Jul 2022 01:17:35 +0000 (21:17 -0400)]
adjust code for copy_op changes

2 years agotest for better error location on stack pop
Ralf Jung [Sun, 3 Jul 2022 00:28:39 +0000 (20:28 -0400)]
test for better error location on stack pop

2 years agoadjust tests for removal of unsized_locals
Ralf Jung [Sun, 3 Jul 2022 00:10:44 +0000 (20:10 -0400)]
adjust tests for removal of unsized_locals

2 years agoAuto merge of #2341 - RalfJung:rustup, r=RalfJung
bors [Thu, 7 Jul 2022 01:40:22 +0000 (01:40 +0000)]
Auto merge of #2341 - RalfJung:rustup, r=RalfJung

rustup; ptr atomics

Adds support for the operations added in https://github.com/rust-lang/rust/pull/96935.
I made the pointer-binops always return the provenance of the *left* argument; `@thomcc` I hope that is what you intended. I have honestly no idea if it has anything to do with what LLVM does...

I also simplified our pointer comparison code while I was at it -- now that *all* comparison operators support wide pointers, we can unify those branches.

2 years agorustup; ptr atomics
Ralf Jung [Thu, 7 Jul 2022 01:28:47 +0000 (21:28 -0400)]
rustup; ptr atomics

2 years agoAuto merge of #2339 - RalfJung:rustup, r=RalfJung
bors [Wed, 6 Jul 2022 18:07:57 +0000 (18:07 +0000)]
Auto merge of #2339 - RalfJung:rustup, r=RalfJung

rustup

2 years agorustup
Ralf Jung [Wed, 6 Jul 2022 18:06:15 +0000 (14:06 -0400)]
rustup

2 years agoAuto merge of #2338 - RalfJung:format, r=RalfJung
bors [Wed, 6 Jul 2022 13:49:46 +0000 (13:49 +0000)]
Auto merge of #2338 - RalfJung:format, r=RalfJung

tweak format strings

2 years agotweak format strings
Ralf Jung [Wed, 6 Jul 2022 13:47:48 +0000 (09:47 -0400)]
tweak format strings

2 years agoAuto merge of #2336 - RalfJung:wide-ptr-compare, r=RalfJung
bors [Wed, 6 Jul 2022 12:16:25 +0000 (12:16 +0000)]
Auto merge of #2336 - RalfJung:wide-ptr-compare, r=RalfJung

fix comparing wide raw pointers

Fixes https://github.com/rust-lang/rust/issues/96169

However I am not sure if these are the correct semantics. I'll wait for confirmation in that issue.

2 years agoAuto merge of #2337 - RalfJung:rustup, r=RalfJung
bors [Wed, 6 Jul 2022 02:30:17 +0000 (02:30 +0000)]
Auto merge of #2337 - RalfJung:rustup, r=RalfJung

rustup

Adds a regression test for https://github.com/rust-lang/rust/issues/96185

2 years agorustup
Ralf Jung [Wed, 6 Jul 2022 02:29:38 +0000 (22:29 -0400)]
rustup

2 years agofix comparing wide raw pointers
Ralf Jung [Wed, 6 Jul 2022 01:11:48 +0000 (21:11 -0400)]
fix comparing wide raw pointers

2 years agoAuto merge of #2335 - RalfJung:rustup, r=RalfJung
bors [Tue, 5 Jul 2022 22:17:31 +0000 (22:17 +0000)]
Auto merge of #2335 - RalfJung:rustup, r=RalfJung

rustup

2 years agorustup
Ralf Jung [Tue, 5 Jul 2022 22:16:20 +0000 (18:16 -0400)]
rustup

2 years agoAuto merge of #2323 - RalfJung:box-is-special, r=RalfJung
bors [Tue, 5 Jul 2022 12:35:03 +0000 (12:35 +0000)]
Auto merge of #2323 - RalfJung:box-is-special, r=RalfJung

handle Box with allocators

This is the Miri side of https://github.com/rust-lang/rust/pull/98847.

Thanks `@DrMeepster` for doing most of the work of getting this test case to pass in Miri. :)

2 years agohandle Box with allocators
Ralf Jung [Mon, 4 Jul 2022 03:18:27 +0000 (23:18 -0400)]
handle Box with allocators

2 years agoAuto merge of #2334 - RalfJung:range, r=RalfJung
bors [Tue, 5 Jul 2022 11:56:14 +0000 (11:56 +0000)]
Auto merge of #2334 - RalfJung:range, r=RalfJung

we don't need HexRange any more

2 years agowe don't need HexRange any more
Ralf Jung [Tue, 5 Jul 2022 11:38:42 +0000 (07:38 -0400)]
we don't need HexRange any more

2 years agoAuto merge of #2329 - RalfJung:benches, r=oli-obk
bors [Tue, 5 Jul 2022 11:29:55 +0000 (11:29 +0000)]
Auto merge of #2329 - RalfJung:benches, r=oli-obk

add command to run our benchmarks

This is quite ad-hoc but better than nothing IMO.
I have also deleted the old `benches` folder. Some of these tests have UB :joy: and the rest doesn't seem very useful to benchmark the things that are slow about Miri today.

Cc `@saethlin`

2 years agoAuto merge of #2333 - rust-lang:miriup, r=oli-obk
bors [Tue, 5 Jul 2022 10:18:54 +0000 (10:18 +0000)]
Auto merge of #2333 - rust-lang:miriup, r=oli-obk

Bump rust version

rustc changes: https://github.com/rust-lang/rust/pull/98811

rustc issue: https://github.com/rust-lang/rust/issues/98922

2 years agoBump rust version
Oli Scherer [Tue, 5 Jul 2022 10:17:43 +0000 (10:17 +0000)]
Bump rust version

2 years agoAuto merge of #2330 - RalfJung:notex, r=oli-obk
bors [Tue, 5 Jul 2022 08:28:17 +0000 (08:28 +0000)]
Auto merge of #2330 - RalfJung:notex, r=oli-obk

remove ancient tex files

These are the sources of `@solson's` original report, I think. They will remain available in the git history, but I don't think there is much point in still carrying them around on master. The readme links to their rendered PDFs:
- https://solson.me/miri-slides.pdf
- https://solson.me/miri-report.pdf

2 years agodo not enable expensive-debug-assertions in installed Miri in CI
Ralf Jung [Tue, 5 Jul 2022 00:05:22 +0000 (20:05 -0400)]
do not enable expensive-debug-assertions in installed Miri in CI

2 years agoensure that benchmarks can actually run
Ralf Jung [Mon, 4 Jul 2022 23:40:44 +0000 (19:40 -0400)]
ensure that benchmarks can actually run

2 years agoless silly Cargo.toml
Ralf Jung [Mon, 4 Jul 2022 23:26:43 +0000 (19:26 -0400)]
less silly Cargo.toml

2 years agoAuto merge of #2331 - RalfJung:trophy, r=RalfJung
bors [Mon, 4 Jul 2022 20:11:17 +0000 (20:11 +0000)]
Auto merge of #2331 - RalfJung:trophy, r=RalfJung

trophy case++

2 years agotrophy case++
Ralf Jung [Mon, 4 Jul 2022 20:10:32 +0000 (16:10 -0400)]
trophy case++

2 years agoadd a simple benchmark with concurrency
Ralf Jung [Mon, 4 Jul 2022 19:58:55 +0000 (15:58 -0400)]
add a simple benchmark with concurrency

2 years agoremove ancient tex files
Ralf Jung [Mon, 4 Jul 2022 19:26:02 +0000 (15:26 -0400)]
remove ancient tex files

2 years agoadd command to run our benchmarks
Ralf Jung [Mon, 4 Jul 2022 19:15:23 +0000 (15:15 -0400)]
add command to run our benchmarks

2 years agomake unicode benchmark not take 20s
Ralf Jung [Mon, 4 Jul 2022 19:12:40 +0000 (15:12 -0400)]
make unicode benchmark not take 20s

2 years agodelete ancient benchmarks
Ralf Jung [Mon, 4 Jul 2022 19:11:14 +0000 (15:11 -0400)]
delete ancient benchmarks

2 years agoAuto merge of #2327 - RalfJung:unit-return, r=RalfJung
bors [Mon, 4 Jul 2022 17:47:28 +0000 (17:47 +0000)]
Auto merge of #2327 - RalfJung:unit-return, r=RalfJung

call_function: make the unit-return-type case more convenient

2 years agocall_function: make the unit-return-type case more convenient
Ralf Jung [Mon, 4 Jul 2022 17:46:11 +0000 (13:46 -0400)]
call_function: make the unit-return-type case more convenient

2 years agoAuto merge of #2326 - RalfJung:vscode, r=RalfJung
bors [Mon, 4 Jul 2022 17:07:46 +0000 (17:07 +0000)]
Auto merge of #2326 - RalfJung:vscode, r=RalfJung

update vscode settings

Following [this recommendation](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/.22target.22.20directory.20in.20rustc.20tree.3F/near/288428273)
Cc https://github.com/rust-lang/rustc-dev-guide/pull/1384

2 years agoupdate vscode settings
Ralf Jung [Mon, 4 Jul 2022 16:51:20 +0000 (12:51 -0400)]
update vscode settings

2 years agoAuto merge of #2320 - RalfJung:less-rebuilds, r=RalfJung
bors [Sun, 3 Jul 2022 16:31:49 +0000 (16:31 +0000)]
Auto merge of #2320 - RalfJung:less-rebuilds, r=RalfJung

reduce regex features to reduce rebuilds

Helps with the issue I [mentioned on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/269128-miri/topic/Miri.20rebuilds/near/287442340).

2 years agoreduce regex features to reduce rebuilds
Ralf Jung [Sun, 3 Jul 2022 16:28:57 +0000 (12:28 -0400)]
reduce regex features to reduce rebuilds

2 years agoAuto merge of #2319 - RalfJung:dont-touch-vtables, r=RalfJung
bors [Sun, 3 Jul 2022 15:56:55 +0000 (15:56 +0000)]
Auto merge of #2319 - RalfJung:dont-touch-vtables, r=RalfJung

fix retagging of vtable ptrs

Fixes a problem reported by `@saethlin` on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/269128-miri/topic/Stacked.20Borrows.20field.20retagging/near/288040048).

2 years agofix retagging of vtable ptrs
Ralf Jung [Sun, 3 Jul 2022 15:54:47 +0000 (11:54 -0400)]
fix retagging of vtable ptrs

2 years agoAuto merge of #2318 - RalfJung:nodoc, r=RalfJung
bors [Sun, 3 Jul 2022 15:03:19 +0000 (15:03 +0000)]
Auto merge of #2318 - RalfJung:nodoc, r=RalfJung

there are no doctests in ui_test

It tries to run doctests which leads to an error when testing against a locally built rustc (that has no rustdoc).

2 years agono doctests in ui_test
Ralf Jung [Sun, 3 Jul 2022 14:45:39 +0000 (10:45 -0400)]
no doctests in ui_test

2 years agoAuto merge of #1935 - saethlin:optimize-sb, r=RalfJung
bors [Sun, 3 Jul 2022 14:39:22 +0000 (14:39 +0000)]
Auto merge of #1935 - saethlin:optimize-sb, r=RalfJung

Optimizing Stacked Borrows (part 1?): Cache locations of Tags in a Borrow Stack

Before this PR, a profile of Miri under almost any workload points quite squarely at these regions of code as being incredibly hot (each being ~40% of cycles):

https://github.com/rust-lang/miri/blob/dadcbebfbd017aac2358cf652a4bd71a91694edc/src/stacked_borrows.rs#L259-L269

https://github.com/rust-lang/miri/blob/dadcbebfbd017aac2358cf652a4bd71a91694edc/src/stacked_borrows.rs#L362-L369

This code is one of at least three reasons that stacked borrows analysis is super-linear: These are both linear in the number of borrows in the stack and they are positioned along the most commonly-taken paths.

I'm addressing the first loop (which is in `Stack::find_granting`) by adding a very very simple sort of LRU cache implemented on a `VecDeque`, which maps recently-looked-up tags to their position in the stack. For `Untagged` access we fall back to the same sort of linear search. But as far as I can tell there are never enough `Untagged` items to be significant.

I'm addressing the second loop by keeping track of the region of stack where there could be items granting `Permission::Unique`. This optimization is incredibly effective because `Read` access tends to dominate and many trips through this code path now skip the loop entirely.

These optimizations result in pretty enormous improvements:
Without raw pointer tagging, `mse` 34.5s -> 2.4s, `serde1` 5.6s -> 3.6s
With raw pointer tagging, `mse` 35.3s -> 2.4s, `serde1` 5.7s -> 3.6s

And there is hardly any impact on memory usage:
Memory usage on `mse` 844 MB -> 848 MB, `serde1` 184 MB -> 184 MB (jitter on these is a few MB).

2 years agoAuto merge of #2316 - domenicquirl:readme-track-tag, r=RalfJung
bors [Sun, 3 Jul 2022 14:07:27 +0000 (14:07 +0000)]
Auto merge of #2316 - domenicquirl:readme-track-tag, r=RalfJung

Clarify the effect of the `-Zmiri-track-pointer-tag` flag in the README

Edit the README to explicitly say that the `-Zmiri-track-pointer-tag` flag also tracks the creation of tags, not just when they are popped/invalidated.

Related to https://github.com/rust-lang/miri/pull/2308 / https://github.com/Manishearth/triomphe/issues/38.

2 years agoclarify that a (tracked) tag may never be popped
DQ [Sun, 3 Jul 2022 13:47:39 +0000 (15:47 +0200)]
clarify that a (tracked) tag may never be popped

Co-authored-by: Ralf Jung <post@ralfj.de>
2 years agoAuto merge of #2317 - RalfJung:this-is-not-a-std-test-suite, r=RalfJung
bors [Sun, 3 Jul 2022 12:36:04 +0000 (12:36 +0000)]
Auto merge of #2317 - RalfJung:this-is-not-a-std-test-suite, r=RalfJung

move arc_drop test to miri-test-libstd

That's where we have a bunch of slow and unlikely-to-regress tests already. Miri's test suite should primarily test Miri; we sometimes add libstd tests when they are cheap and/or exercise interesting code paths in Miri. https://github.com/rust-lang/miri/pull/2248 already ensures that we allow code like `Arc` with more direct tests.

2 years agofix ./miri run with MIRI_TEST_TARGET
Ralf Jung [Sun, 3 Jul 2022 12:35:44 +0000 (08:35 -0400)]
fix ./miri run with MIRI_TEST_TARGET

2 years agoanother one for the trophy case
Ralf Jung [Sun, 3 Jul 2022 12:18:03 +0000 (08:18 -0400)]
another one for the trophy case

2 years agomove arc_drop test to miri-test-libstd
Ralf Jung [Sun, 3 Jul 2022 12:13:58 +0000 (08:13 -0400)]
move arc_drop test to miri-test-libstd

and make weak memory consistency test a bit faster again

2 years agoClarify `-Zmiri-track-pointer-tag`
DQ [Sun, 3 Jul 2022 09:32:36 +0000 (11:32 +0200)]
Clarify `-Zmiri-track-pointer-tag`

to explicitly say it also tracks tag creation

2 years agoTypo
Ben Kimock [Sun, 3 Jul 2022 00:45:27 +0000 (20:45 -0400)]
Typo

2 years agoExplain cache behavior a bit better, clean up diff
Ben Kimock [Sat, 2 Jul 2022 23:44:55 +0000 (19:44 -0400)]
Explain cache behavior a bit better, clean up diff

2 years agoAuto merge of #2312 - RalfJung:misc, r=RalfJung
bors [Sat, 2 Jul 2022 22:38:36 +0000 (22:38 +0000)]
Auto merge of #2312 - RalfJung:misc, r=RalfJung

put call to stacked borrows end_call in a more sensible place

This looks like a refactoring accident.

2 years agoreadme tweaks
Ralf Jung [Sat, 2 Jul 2022 22:36:34 +0000 (18:36 -0400)]
readme tweaks

2 years agoput call to stacked borrows end_call in a more sensible place
Ralf Jung [Sat, 2 Jul 2022 22:33:03 +0000 (18:33 -0400)]
put call to stacked borrows end_call in a more sensible place

2 years agoAuto merge of #2311 - RalfJung:many-seeds, r=RalfJung
bors [Sat, 2 Jul 2022 20:08:28 +0000 (20:08 +0000)]
Auto merge of #2311 - RalfJung:many-seeds, r=RalfJung

./miri many-seeds: also print the seed before we try it

When using `cargo miri`, we otherwise have no way of even seeing which seed it is currently on.

2 years ago./miri many-seeds: also print the seed before we try it
Ralf Jung [Sat, 2 Jul 2022 20:06:23 +0000 (16:06 -0400)]
./miri many-seeds: also print the seed before we try it

2 years agoAuto merge of #2309 - RalfJung:read_link, r=RalfJung
bors [Sat, 2 Jul 2022 17:32:57 +0000 (17:32 +0000)]
Auto merge of #2309 - RalfJung:read_link, r=RalfJung

test fs::read_link surface function

The shim got implemented a while ago but we never ensured that that is actually what std uses.

2 years agotest fs::read_link surface function
Ralf Jung [Sat, 2 Jul 2022 16:26:00 +0000 (12:26 -0400)]
test fs::read_link surface function

2 years agoExplain the behavior of the cache upon clear
Ben Kimock [Sat, 2 Jul 2022 17:22:22 +0000 (13:22 -0400)]
Explain the behavior of the cache upon clear

2 years agoAuto merge of #2308 - RalfJung:ptr-tacking, r=RalfJung
bors [Sat, 2 Jul 2022 15:34:02 +0000 (15:34 +0000)]
Auto merge of #2308 - RalfJung:ptr-tacking, r=RalfJung

pointer tag tracking: on creation, log the offsets it is created for

Hopefully this makes things like https://github.com/Manishearth/triomphe/issues/38 easier to diagnose.

2 years agopointer tag tracking: on creation, log the offsets it is created for
Ralf Jung [Sat, 2 Jul 2022 14:11:39 +0000 (10:11 -0400)]
pointer tag tracking: on creation, log the offsets it is created for

2 years agoAuto merge of #2306 - RalfJung:unix, r=RalfJung
bors [Sat, 2 Jul 2022 13:45:27 +0000 (13:45 +0000)]
Auto merge of #2306 - RalfJung:unix, r=RalfJung

make some things available for all Unixes

2 years agoposix_fadvise is not Linux-specific
Ralf Jung [Sat, 2 Jul 2022 13:06:35 +0000 (09:06 -0400)]
posix_fadvise is not Linux-specific

2 years agomale libc.rs at least build on FreeBSD
Ralf Jung [Sat, 2 Jul 2022 13:06:17 +0000 (09:06 -0400)]
male libc.rs at least build on FreeBSD

2 years agomove some POSIX file shims from linux to unix module
Ralf Jung [Sat, 2 Jul 2022 12:58:04 +0000 (08:58 -0400)]
move some POSIX file shims from linux to unix module

2 years agoAuto merge of #2300 - InfRandomness:freebsd-environ-extern-impl, r=RalfJung
bors [Sat, 2 Jul 2022 12:57:14 +0000 (12:57 +0000)]
Auto merge of #2300 - InfRandomness:freebsd-environ-extern-impl, r=RalfJung

Extend `environ` linux extern implementation to freebsd

This fixes the `env` test on freebsd, and enables the CI test

Signed-off-by: InfRandomness <infrandomness@gmail.com>
2 years agoAuto merge of #2305 - RalfJung:rustup, r=RalfJung
bors [Sat, 2 Jul 2022 12:38:40 +0000 (12:38 +0000)]
Auto merge of #2305 - RalfJung:rustup, r=RalfJung

rustup

2 years agorustup
Ralf Jung [Sat, 2 Jul 2022 12:38:07 +0000 (08:38 -0400)]
rustup

2 years agoEnable env test on freebsd
InfRandomness [Fri, 1 Jul 2022 19:28:45 +0000 (21:28 +0200)]
Enable env test on freebsd

Signed-off-by: InfRandomness <infrandomness@gmail.com>
2 years agoAdd `environ` extern implementation to freebsd
InfRandomness [Fri, 1 Jul 2022 19:24:24 +0000 (21:24 +0200)]
Add `environ` extern implementation to freebsd

Signed-off-by: InfRandomness <infrandomness@gmail.com>
2 years agoAuto merge of #2304 - LegNeato:shim-fstat64-mac, r=oli-obk
bors [Sat, 2 Jul 2022 07:31:16 +0000 (07:31 +0000)]
Auto merge of #2304 - LegNeato:shim-fstat64-mac, r=oli-obk

Support (stat/fstat/lstat)64 on macos

"In order to accommodate advanced capabilities of newer file systems,
     the struct stat, struct statfs, and struct dirent data structures
     were updated in Mac OSX 10.5."

"TRANSITIONAL DESCRIPTION (NOW DEPRECATED)
     The fstat64, lstat64 and stat64 routines are equivalent to their
     corresponding non-64-suffixed routine, when 64-bit inodes are in
     effect.  They were added before there was support for the symbol
     variants, and so are now deprecated.  Instead of using these, set
     the _DARWIN_USE_64_BIT_INODE macro before including header files to
     force 64-bit inode support. The stat64 structure used by these deprecated routines is the same
     as the stat structure when 64-bit inodes are in effect (see above)."

"HISTORY
     An lstat() function call appeared in 4.2BSD.  The stat64(),
     fstat64(), and lstat64() system calls first appeared in Mac OS X
     10.5 (Leopard) and are now deprecated in favor of the corresponding
     symbol variants.  The fstatat() system call appeared in OS X 10.10"

2 years agoSupport (stat/fstat/lstat)64 on macos
Christian Legnitto [Sat, 2 Jul 2022 02:05:15 +0000 (20:05 -0600)]
Support (stat/fstat/lstat)64 on macos

"In order to accommodate advanced capabilities of newer file systems,
     the struct stat, struct statfs, and struct dirent data structures
     were updated in Mac OSX 10.5."

"TRANSITIONAL DESCRIPTION (NOW DEPRECATED)
     The fstat64, lstat64 and stat64 routines are equivalent to their
     corresponding non-64-suffixed routine, when 64-bit inodes are in
     effect.  They were added before there was support for the symbol
     variants, and so are now deprecated.  Instead of using these, set
     the _DARWIN_USE_64_BIT_INODE macro before including header files to
     force 64-bit inode support.

     The stat64 structure used by these deprecated routines is the same
     as the stat structure when 64-bit inodes are in effect (see above)."

"HISTORY
     An lstat() function call appeared in 4.2BSD.  The stat64(),
     fstat64(), and lstat64() system calls first appeared in Mac OS X
     10.5 (Leopard) and are now deprecated in favor of the corresponding
     symbol variants.  The fstatat() system call appeared in OS X 10.10"

2 years agoDocument implementation a bit, add some fast paths
Ben Kimock [Sat, 2 Jul 2022 00:15:34 +0000 (20:15 -0400)]
Document implementation a bit, add some fast paths

2 years agoAuto merge of #2302 - RalfJung:datarace, r=RalfJung
bors [Sat, 2 Jul 2022 00:14:06 +0000 (00:14 +0000)]
Auto merge of #2302 - RalfJung:datarace, r=RalfJung

avoid copying thread manager state in data race detector

When doing https://github.com/rust-lang/miri/pull/2047 I did not realize that there is some redundant state here that we can now remove from the data race detector.

Also this removes the vector clocks from the data race errors since those don't really help diagnose the problem.

2 years agofix and slightly improve data race reports
Ralf Jung [Fri, 1 Jul 2022 21:33:17 +0000 (17:33 -0400)]
fix and slightly improve data race reports

2 years agoCache lookups into the borrow stack
Ben Kimock [Wed, 8 Dec 2021 03:05:13 +0000 (22:05 -0500)]
Cache lookups into the borrow stack

This adds a very simple LRU-like cache which stores the locations of
often-used tags. While the implementation is very simple, the cache hit
rate is incredible at ~99.9% on most programs, and often the element at
position 0 in the cache has a hit rate of 90%. So the sub-optimality of
this cache basicaly vanishes into the noise in a profile.

Additionally, we keep a range which denotes where there might be an item
granting Unique permission in the stack, so that when we invalidate
Uniques we do not need to scan much of the stack, and often scan nothing
at all.

2 years agoavoid copying thread manager state in data race detector
Ralf Jung [Fri, 1 Jul 2022 21:07:29 +0000 (17:07 -0400)]
avoid copying thread manager state in data race detector

2 years agorename some data_race types for more clarity
Ralf Jung [Fri, 1 Jul 2022 20:21:46 +0000 (16:21 -0400)]
rename some data_race types for more clarity

2 years agoAuto merge of #2299 - RalfJung:bsd, r=RalfJung
bors [Fri, 1 Jul 2022 18:14:23 +0000 (18:14 +0000)]
Auto merge of #2299 - RalfJung:bsd, r=RalfJung

test more things on FreeBSD

2 years agorun data_race tests on bsd
Ralf Jung [Fri, 1 Jul 2022 18:13:36 +0000 (14:13 -0400)]
run data_race tests on bsd

2 years agomore current_dir tests for freebsd
Ralf Jung [Fri, 1 Jul 2022 18:12:25 +0000 (14:12 -0400)]
more current_dir tests for freebsd

2 years agoAuto merge of #2298 - InfRandomness:shim-error, r=RalfJung
bors [Fri, 1 Jul 2022 17:41:10 +0000 (17:41 +0000)]
Auto merge of #2298 - InfRandomness:shim-error, r=RalfJung

Add `__error` to freebsd shims

Signed-off-by: InfRandomness <infrandomness@gmail.com>
2 years agoAdd `current_dir_with_isolation` to freebsd tests list
InfRandomness [Fri, 1 Jul 2022 16:52:32 +0000 (18:52 +0200)]
Add `current_dir_with_isolation` to freebsd tests list

Signed-off-by: InfRandomness <infrandomness@gmail.com>
2 years agoAdd `__error` to freebsd shims
InfRandomness [Fri, 1 Jul 2022 16:36:14 +0000 (18:36 +0200)]
Add `__error` to freebsd shims

Signed-off-by: InfRandomness <infrandomness@gmail.com>
2 years agoAuto merge of #2297 - RalfJung:rustup, r=RalfJung
bors [Fri, 1 Jul 2022 16:26:25 +0000 (16:26 +0000)]
Auto merge of #2297 - RalfJung:rustup, r=RalfJung

rustup

2 years agomake clippy happy
Ralf Jung [Fri, 1 Jul 2022 16:25:35 +0000 (12:25 -0400)]
make clippy happy

2 years agoAuto merge of #2296 - RalfJung:miri-script, r=RalfJung
bors [Fri, 1 Jul 2022 14:46:30 +0000 (14:46 +0000)]
Auto merge of #2296 - RalfJung:miri-script, r=RalfJung

./miri improvements

I have needed to run something with many different seeds often enough that I would like an easier way to do it. ;) So now we have `./miri many-seeds`.

Also I made the script less dependent on the working directory, so calling it from a different directory should work properly now even if that other directory does not have the same rustup override as the one where Miri lives.

2 years agorustup
Ralf Jung [Fri, 1 Jul 2022 14:14:31 +0000 (10:14 -0400)]
rustup