]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoReturn length from write_os_str_to_c_str
David Cook [Tue, 25 Feb 2020 01:50:25 +0000 (19:50 -0600)]
Return length from write_os_str_to_c_str

4 years agoMigrate readdir_r from pointers to places
David Cook [Tue, 25 Feb 2020 01:38:17 +0000 (19:38 -0600)]
Migrate readdir_r from pointers to places

4 years agoReview comments
David Cook [Tue, 25 Feb 2020 01:16:41 +0000 (19:16 -0600)]
Review comments

4 years agoUse ID numbers in lieu of allocations for DIR*
David Cook [Sun, 16 Feb 2020 20:49:48 +0000 (14:49 -0600)]
Use ID numbers in lieu of allocations for DIR*

4 years agoAdd comments
David Cook [Sun, 16 Feb 2020 19:44:19 +0000 (13:44 -0600)]
Add comments

4 years agoMove error up, early return
David Cook [Sun, 16 Feb 2020 19:39:06 +0000 (13:39 -0600)]
Move error up, early return

4 years agoAdd comments
David Cook [Sun, 16 Feb 2020 19:22:50 +0000 (13:22 -0600)]
Add comments

4 years agoUse os_str_length_as_c_str in readdir[64]_r
David Cook [Sun, 16 Feb 2020 19:13:16 +0000 (13:13 -0600)]
Use os_str_length_as_c_str in readdir[64]_r

4 years agoMiscellaneous review comments
David Cook [Sun, 16 Feb 2020 18:12:20 +0000 (12:12 -0600)]
Miscellaneous review comments

4 years agoRewrite fs tests
David Cook [Sun, 9 Feb 2020 04:27:26 +0000 (22:27 -0600)]
Rewrite fs tests

4 years agoFix interpreted OS detection
David Cook [Sun, 9 Feb 2020 02:44:35 +0000 (20:44 -0600)]
Fix interpreted OS detection

4 years agoAdd doc comment inside DirHandler
David Cook [Sun, 9 Feb 2020 02:44:02 +0000 (20:44 -0600)]
Add doc comment inside DirHandler

4 years agoFix dirent layout for macOS
David Cook [Fri, 31 Jan 2020 00:57:01 +0000 (18:57 -0600)]
Fix dirent layout for macOS

4 years agoUse longer file names in test
David Cook [Sun, 26 Jan 2020 21:45:35 +0000 (15:45 -0600)]
Use longer file names in test

4 years agoAdd more information to test asserts
David Cook [Sun, 26 Jan 2020 21:09:24 +0000 (15:09 -0600)]
Add more information to test asserts

4 years agoAdd shims for macOS-specific symbols
David Cook [Sun, 26 Jan 2020 20:47:36 +0000 (14:47 -0600)]
Add shims for macOS-specific symbols

4 years agoHandle differing sizes of mode_t
David Cook [Sun, 26 Jan 2020 20:13:22 +0000 (14:13 -0600)]
Handle differing sizes of mode_t

mode_t is a u32 on Linux and a u16 on macOS

4 years agoAdd shim for readdir64_r
David Cook [Sat, 25 Jan 2020 23:36:51 +0000 (17:36 -0600)]
Add shim for readdir64_r

4 years agoAdd shims for opendir and closedir
David Cook [Sat, 25 Jan 2020 18:57:15 +0000 (12:57 -0600)]
Add shims for opendir and closedir

4 years agoAdd shims for mkdir and rmdir
David Cook [Sat, 25 Jan 2020 00:56:23 +0000 (18:56 -0600)]
Add shims for mkdir and rmdir

4 years agoAuto merge of #1189 - RalfJung:cleanup, r=RalfJung
bors [Sun, 23 Feb 2020 18:11:37 +0000 (18:11 +0000)]
Auto merge of #1189 - RalfJung:cleanup, r=RalfJung

some foreign_items cleanup

Cc @christianpoveda

4 years agoavoid lowercasing platforms
Ralf Jung [Sun, 23 Feb 2020 17:54:08 +0000 (18:54 +0100)]
avoid lowercasing platforms

4 years agoimprove comments
Ralf Jung [Sun, 23 Feb 2020 17:48:44 +0000 (18:48 +0100)]
improve comments

4 years agoadd private helper trait for fs shim
Ralf Jung [Sun, 23 Feb 2020 17:48:38 +0000 (18:48 +0100)]
add private helper trait for fs shim

4 years agohelpers.rs cleanup
Ralf Jung [Sun, 23 Feb 2020 17:44:40 +0000 (18:44 +0100)]
helpers.rs cleanup

4 years agoAuto merge of #1167 - christianpoveda:shims-refactor, r=RalfJung
bors [Sun, 23 Feb 2020 17:03:30 +0000 (17:03 +0000)]
Auto merge of #1167 - christianpoveda:shims-refactor, r=RalfJung

Reorganize shims by platform

Fixes https://github.com/rust-lang/miri/issues/1161. I am currently testing which shims belong to which platform. If you are reading this and know the answer for any of those please write me :P

Edit: this is a list of the shims I haven't been able to figure out to which platform they belong:
 -~~`malloc`~~
 -~~`calloc`~~
 -~~`posix_memalign`~~
 -~~`free`~~
 -~~`realloc`~~
 -~~`__rust_alloc`~~
 -~~`__rust_alloc_zeroed`~~
 -~~`__rust_dealloc`~~
 -~~`__rust_realloc`~~
 -~~`__rust_maybe_catch_panic`~~
 -~~`syscall`~~
 -~~`getrandom`~~
 -~~`dlsym`~~
 -~~`memcmp`~~
 -~~`memrchr`~~
 -~~`memchr`~~
 -~~`strlen`~~
 -~~`signal`~~
 -~~`sigaction`~~
 -~~`sigaltstack`~~
 -~~`sysconf`~~
 -~~`sched_getaffinity`~~
 -~~`isatty`~~
 -~~`pthread_key_create`~~
 -~~`pthread_key_delete`~~
 -~~`pthread_getspecific`~~
 -~~`pthread_setspecific`~~
 -~~`pthread_attr_init`~~
 -~~`pthread_attr_destroy`~~
 -~~`pthread_self`~~
 -~~`pthread_attr_setstacksize`~~
 -~~`pthread_attr_getstack`~~
 -~~`pthread_create`~~
 -~~`pthread_mutexattr_init`~~
 -~~`pthread_mutexattr_settype`~~
 -~~`pthread_mutex_init`~~
 -~~`pthread_mutexattr_destroy`~~
 -~~`pthread_mutex_lock`~~
 -~~`pthread_mutex_unlock`~~
 -~~`pthread_mutex_destroy`~~
 -~~`pthread_rwlock_rdlock`~~
 -~~`pthread_rwlock_unlock`~~
 -~~`pthread_rwlock_wrlock`~~
 -~~`pthread_rwlock_destroy`~~
 -~~`pthread_condattr_init`~~
 -~~`pthread_condattr_setclock`~~
 -~~`pthread_cond_init`~~
 -~~`pthread_condattr_destroy`~~
 -~~`pthread_cond_destroy`~~
 -~~`pthread_atfork`~~
 -~~`posix_fadvise`~~
 -~~`mmap`~~
 -~~`mprotect`~~

4 years agopanic if target platform is incorrect instead
Christian Poveda [Sat, 22 Feb 2020 14:02:25 +0000 (09:02 -0500)]
panic if target platform is incorrect instead

4 years agoimprove docs
Christian Poveda [Sat, 22 Feb 2020 13:55:45 +0000 (08:55 -0500)]
improve docs

4 years agoAuto merge of #1185 - RalfJung:readme, r=RalfJung
bors [Sat, 22 Feb 2020 10:58:53 +0000 (10:58 +0000)]
Auto merge of #1185 - RalfJung:readme, r=RalfJung

fix README

With https://github.com/rust-lang/miri/pull/1127, we do not abort execution any more when the tracked tag gets popped, we just show a backtrace.

4 years agofix README
Ralf Jung [Fri, 21 Feb 2020 07:34:25 +0000 (08:34 +0100)]
fix README

4 years agominor fixes
Christian Poveda [Sat, 22 Feb 2020 07:18:42 +0000 (02:18 -0500)]
minor fixes

4 years agoAuto merge of #1188 - RalfJung:bootstrap, r=RalfJung
bors [Fri, 21 Feb 2020 19:07:37 +0000 (19:07 +0000)]
Auto merge of #1188 - RalfJung:bootstrap, r=RalfJung

dont overwrite bootstrap flags

4 years agodont overwrite bootstrap flags
Ralf Jung [Fri, 21 Feb 2020 19:06:31 +0000 (20:06 +0100)]
dont overwrite bootstrap flags

4 years agoAuto merge of #1187 - RalfJung:rustup, r=RalfJung
bors [Fri, 21 Feb 2020 10:06:24 +0000 (10:06 +0000)]
Auto merge of #1187 - RalfJung:rustup, r=RalfJung

fix for const-prop lint changes

Cc https://github.com/rust-lang/rust/issues/69331

4 years agoremove some no-longer-needed allow(const_err)
Ralf Jung [Fri, 21 Feb 2020 10:05:56 +0000 (11:05 +0100)]
remove some no-longer-needed allow(const_err)

4 years agofix test-cargo-miri
Ralf Jung [Fri, 21 Feb 2020 10:03:52 +0000 (11:03 +0100)]
fix test-cargo-miri

4 years agofix for const-prop lint changes
Ralf Jung [Fri, 21 Feb 2020 09:28:24 +0000 (10:28 +0100)]
fix for const-prop lint changes

4 years agoAuto merge of #1184 - divergentdave:rename-error-test, r=RalfJung
bors [Fri, 21 Feb 2020 07:36:14 +0000 (07:36 +0000)]
Auto merge of #1184 - divergentdave:rename-error-test, r=RalfJung

Test error case of std::fs::rename

As suggested [here](https://github.com/rust-lang/miri/pull/1158#issuecomment-586459463) this PR adds an additional test case for calling rename on a file path that doesn't exist.

4 years agoTest error case of std::fs::rename
David Cook [Fri, 21 Feb 2020 03:54:52 +0000 (21:54 -0600)]
Test error case of std::fs::rename

4 years agoAuto merge of #1182 - rust-lang:rustup, r=RalfJung
bors [Thu, 20 Feb 2020 10:10:14 +0000 (10:10 +0000)]
Auto merge of #1182 - rust-lang:rustup, r=RalfJung

rustup

We got a CI failure from our cronjob. It looks spurious, but better safe than sorry.

4 years agorustup
Ralf Jung [Thu, 20 Feb 2020 10:09:12 +0000 (11:09 +0100)]
rustup

4 years agorename platform specific shims
Christian Poveda [Wed, 19 Feb 2020 22:53:33 +0000 (17:53 -0500)]
rename platform specific shims

4 years agoremove syscall shim from macos and move getrandom to linux module
Christian Poveda [Wed, 19 Feb 2020 22:28:48 +0000 (17:28 -0500)]
remove syscall shim from macos and move getrandom to linux module

4 years agopromote memrchr to work on any platform
Christian Poveda [Wed, 19 Feb 2020 22:23:27 +0000 (17:23 -0500)]
promote memrchr to work on any platform

4 years agopromote open and lseek shims to posix
Christian Poveda [Wed, 19 Feb 2020 22:17:47 +0000 (17:17 -0500)]
promote open and lseek shims to posix

4 years agoadd docs for `emulate_foreign_item_by_bame
Christian Poveda [Wed, 19 Feb 2020 22:09:12 +0000 (17:09 -0500)]
add docs for `emulate_foreign_item_by_bame

4 years agoreorganize comments for shim's classification
Christian Poveda [Wed, 19 Feb 2020 22:03:00 +0000 (17:03 -0500)]
reorganize comments for shim's classification

4 years agomove CreateThread to windows shims
Christian Poveda [Wed, 19 Feb 2020 21:52:34 +0000 (16:52 -0500)]
move CreateThread to windows shims

4 years agoremove hack for panics
Christian Poveda [Wed, 12 Feb 2020 00:00:41 +0000 (19:00 -0500)]
remove hack for panics

4 years agomove remaining shims
Christian Poveda [Tue, 11 Feb 2020 23:48:38 +0000 (18:48 -0500)]
move remaining shims

4 years agomove pthread related functions
Christian Poveda [Tue, 11 Feb 2020 23:32:28 +0000 (18:32 -0500)]
move pthread related functions

4 years agoadd helper function for target platform checks
Christian Poveda [Sat, 8 Feb 2020 18:29:26 +0000 (13:29 -0500)]
add helper function for target platform checks

4 years agoAuto merge of #1180 - RalfJung:fs-refact, r=RalfJung
bors [Wed, 19 Feb 2020 10:17:32 +0000 (10:17 +0000)]
Auto merge of #1180 - RalfJung:fs-refact, r=RalfJung

Slight refactoring of FS test

4 years agotest a bit more
Ralf Jung [Wed, 19 Feb 2020 10:14:30 +0000 (11:14 +0100)]
test a bit more

4 years agofactor more common code
Ralf Jung [Wed, 19 Feb 2020 10:08:24 +0000 (11:08 +0100)]
factor more common code

4 years agofs test: factor some common code
Ralf Jung [Wed, 19 Feb 2020 10:04:59 +0000 (11:04 +0100)]
fs test: factor some common code

4 years agoAuto merge of #1179 - RalfJung:rustup, r=RalfJung
bors [Wed, 19 Feb 2020 09:08:57 +0000 (09:08 +0000)]
Auto merge of #1179 - RalfJung:rustup, r=RalfJung

bump Rust (no changes needed)

4 years agoAuto merge of #1156 - divergentdave:fcntl-F_DUPFD_CLOEXEC, r=RalfJung
bors [Wed, 19 Feb 2020 08:45:04 +0000 (08:45 +0000)]
Auto merge of #1156 - divergentdave:fcntl-F_DUPFD_CLOEXEC, r=RalfJung

Add F_DUPFD/F_DUPFD_CLOEXEC to fcntl shim

This adds support for `F_DUPFD` and `F_DUPFD_CLOEXEC` to the shim for `fcntl`. (The `FileHandler` does not track the `FD_CLOEXEC` flag for open files, so these commands are effectively the same.) These changes enable using `File::try_clone`.

I also changed the initial value of the `low` field in `FileHandler`, so that it matches the intent of the preceding comment. The `open` shim was pre-incrementing it when choosing new file descriptor numbers, so FD 3 was being skipped.

4 years agobump Rust (no changes needed)
Ralf Jung [Wed, 19 Feb 2020 08:15:12 +0000 (09:15 +0100)]
bump Rust (no changes needed)

4 years agoExtract constant for minimum fd
David Cook [Wed, 19 Feb 2020 00:06:33 +0000 (18:06 -0600)]
Extract constant for minimum fd

4 years agoRewrite file system tests
David Cook [Tue, 18 Feb 2020 04:36:33 +0000 (22:36 -0600)]
Rewrite file system tests

4 years agoBack out placeholder variants from FileHandle
David Cook [Sun, 16 Feb 2020 22:59:54 +0000 (16:59 -0600)]
Back out placeholder variants from FileHandle

4 years agoAddress review comments
David Cook [Sun, 16 Feb 2020 22:51:02 +0000 (16:51 -0600)]
Address review comments

4 years agoRewrite file descriptor handling
David Cook [Sun, 9 Feb 2020 20:43:45 +0000 (14:43 -0600)]
Rewrite file descriptor handling

4 years agoFunctional test of cloned file handle
David Cook [Fri, 31 Jan 2020 00:43:34 +0000 (18:43 -0600)]
Functional test of cloned file handle

4 years agoAdd methods to FileHandler
David Cook [Fri, 31 Jan 2020 00:38:30 +0000 (18:38 -0600)]
Add methods to FileHandler

4 years agoStyle fixes
David Cook [Fri, 31 Jan 2020 00:31:34 +0000 (18:31 -0600)]
Style fixes

4 years agoAdd comment
David Cook [Wed, 29 Jan 2020 05:18:09 +0000 (23:18 -0600)]
Add comment

4 years agoAdd F_DUPFD/F_DUPFD_CLOEXEC to fcntl shim
David Cook [Sun, 26 Jan 2020 17:19:06 +0000 (11:19 -0600)]
Add F_DUPFD/F_DUPFD_CLOEXEC to fcntl shim

4 years agoAuto merge of #1176 - RalfJung:readme, r=oli-obk
bors [Sun, 16 Feb 2020 21:48:38 +0000 (21:48 +0000)]
Auto merge of #1176 - RalfJung:readme, r=oli-obk

update Readme

4 years agoclarify caveats
Ralf Jung [Sun, 16 Feb 2020 11:38:00 +0000 (12:38 +0100)]
clarify caveats

4 years agoupdate README
Ralf Jung [Sun, 16 Feb 2020 11:37:15 +0000 (12:37 +0100)]
update README

4 years agoAuto merge of #1177 - RalfJung:debug-assert, r=RalfJung
bors [Sun, 16 Feb 2020 13:04:06 +0000 (13:04 +0000)]
Auto merge of #1177 - RalfJung:debug-assert, r=RalfJung

Make sure we evaluate debug assertions in local crate and libstd

Fixes https://github.com/rust-lang/miri/issues/1126

4 years agofix compile-fail tests to avoid libstd debug assertions
Ralf Jung [Sun, 16 Feb 2020 13:01:00 +0000 (14:01 +0100)]
fix compile-fail tests to avoid libstd debug assertions

4 years agomake sure we also trigger debug assertions in libstd
Ralf Jung [Sun, 16 Feb 2020 12:55:51 +0000 (13:55 +0100)]
make sure we also trigger debug assertions in libstd

4 years agomake sure assertions and debug-assertions also panic (and can be caught)
Ralf Jung [Sun, 16 Feb 2020 12:47:31 +0000 (13:47 +0100)]
make sure assertions and debug-assertions also panic (and can be caught)

4 years agomigrate more functions
Christian Poveda [Sat, 8 Feb 2020 16:58:42 +0000 (11:58 -0500)]
migrate more functions

4 years agomigrate more functions
Christian Poveda [Thu, 6 Feb 2020 00:46:50 +0000 (19:46 -0500)]
migrate more functions

4 years agoreorganize shims by platform
Christian Poveda [Sun, 2 Feb 2020 21:21:12 +0000 (16:21 -0500)]
reorganize shims by platform

4 years agoAuto merge of #1158 - divergentdave:shim-rename, r=RalfJung
bors [Fri, 14 Feb 2020 20:26:23 +0000 (20:26 +0000)]
Auto merge of #1158 - divergentdave:shim-rename, r=RalfJung

Add shim for rename

This adds a straightforward shim for rename, which is used by `std::fs::rename`. Testing is included.

As a heads up, I expect one or two merge conflicts between my PRs, since some of them touch the same `use` statements, or add items near the same places. I'll rebase and fix them as they come up.

4 years agoRemoving file after rename must succeed
David Cook [Fri, 14 Feb 2020 14:19:16 +0000 (08:19 -0600)]
Removing file after rename must succeed

Co-Authored-By: Ralf Jung <post@ralfj.de>
4 years agoAuto merge of #1174 - RalfJung:rusutp, r=RalfJung
bors [Fri, 14 Feb 2020 08:00:51 +0000 (08:00 +0000)]
Auto merge of #1174 - RalfJung:rusutp, r=RalfJung

Rustup

4 years agorustup
Ralf Jung [Fri, 14 Feb 2020 07:59:42 +0000 (08:59 +0100)]
rustup

4 years agofix for Panic InterpError refactoring
Ralf Jung [Thu, 13 Feb 2020 13:01:35 +0000 (14:01 +0100)]
fix for Panic InterpError refactoring

4 years agoAuto merge of #1172 - RalfJung:rustup, r=RalfJung
bors [Wed, 12 Feb 2020 21:05:30 +0000 (21:05 +0000)]
Auto merge of #1172 - RalfJung:rustup, r=RalfJung

Rustup

and also a test for https://github.com/rust-lang/rust/issues/68303

4 years agoadd test for layout optimizations
Ralf Jung [Wed, 12 Feb 2020 20:50:54 +0000 (21:50 +0100)]
add test for layout optimizations

4 years agorustup
Ralf Jung [Wed, 12 Feb 2020 20:44:09 +0000 (21:44 +0100)]
rustup

4 years agoTest that src path of rename is no longer a file
David Cook [Sun, 9 Feb 2020 04:40:46 +0000 (22:40 -0600)]
Test that src path of rename is no longer a file

4 years agoAdd shim for rename
David Cook [Sun, 26 Jan 2020 22:45:05 +0000 (16:45 -0600)]
Add shim for rename

4 years agoAuto merge of #1159 - divergentdave:shim-seek, r=RalfJung
bors [Sat, 8 Feb 2020 13:54:33 +0000 (13:54 +0000)]
Auto merge of #1159 - divergentdave:shim-seek, r=RalfJung

Add shim for seeking files

This adds a shim for `lseek64` (`lseek` on macOS). This enables the use of `<File as Seek>::seek`. Testing is included.

4 years agoAuto merge of #1169 - RalfJung:rustup, r=RalfJung
bors [Fri, 7 Feb 2020 13:21:15 +0000 (13:21 +0000)]
Auto merge of #1169 - RalfJung:rustup, r=RalfJung

rustup; fix generator test

4 years agopanics dont work on Windows, just the smoke test should be enough
Ralf Jung [Fri, 7 Feb 2020 13:19:58 +0000 (14:19 +0100)]
panics dont work on Windows, just the smoke test should be enough

4 years agotest more generator resume things
Ralf Jung [Fri, 7 Feb 2020 13:02:36 +0000 (14:02 +0100)]
test more generator resume things

4 years agorustup; fix generator test
Ralf Jung [Fri, 7 Feb 2020 12:47:39 +0000 (13:47 +0100)]
rustup; fix generator test

4 years agoAdd tests to cover SEEK_CUR and SEEK_END
David Cook [Thu, 6 Feb 2020 23:50:33 +0000 (17:50 -0600)]
Add tests to cover SEEK_CUR and SEEK_END

4 years agoAuto merge of #1168 - RalfJung:rustup, r=RalfJung
bors [Thu, 6 Feb 2020 10:25:32 +0000 (10:25 +0000)]
Auto merge of #1168 - RalfJung:rustup, r=RalfJung

Rustup

4 years agoalso test div-by-minus-1
Ralf Jung [Thu, 6 Feb 2020 10:24:38 +0000 (11:24 +0100)]
also test div-by-minus-1

4 years agobump rustc; adjust tests
Ralf Jung [Thu, 6 Feb 2020 10:20:28 +0000 (11:20 +0100)]
bump rustc; adjust tests

4 years agoAuto merge of #1165 - JohnTitor:uprust, r=RalfJung
bors [Sun, 2 Feb 2020 13:49:22 +0000 (13:49 +0000)]
Auto merge of #1165 - JohnTitor:uprust, r=RalfJung

Bump rustc

The latest toolstate failure is already fixed (3d8bf92a11f348d8dd2183873ca60e2e4859e5b9), we should only bump rustc and update submodule, I think.
cc: rust-lang/rust#68757

r? @RalfJung

4 years agoBump rustc
Yuki Okushi [Sun, 2 Feb 2020 09:45:53 +0000 (18:45 +0900)]
Bump rustc