]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agouse real align_offset unless we symbolic alignment check is enabled
Ralf Jung [Sun, 16 Aug 2020 16:16:34 +0000 (18:16 +0200)]
use real align_offset unless we symbolic alignment check is enabled

3 years agoadjust diagnostics to alignment check mode
Ralf Jung [Sun, 16 Aug 2020 15:16:53 +0000 (17:16 +0200)]
adjust diagnostics to alignment check mode

3 years agodocument -Zmiri-symbolic-alignment-check
Ralf Jung [Sun, 16 Aug 2020 15:12:32 +0000 (17:12 +0200)]
document -Zmiri-symbolic-alignment-check

3 years agomake alignment check integer-based by default, and add an option to make it symbolic
Ralf Jung [Sun, 16 Aug 2020 15:08:34 +0000 (17:08 +0200)]
make alignment check integer-based by default, and add an option to make it symbolic

3 years agoAuto merge of #1510 - RalfJung:stderr, r=RalfJung
bors [Thu, 13 Aug 2020 12:27:24 +0000 (12:27 +0000)]
Auto merge of #1510 - RalfJung:stderr, r=RalfJung

fix Stderr::as_file_handle error message

3 years agofix Stderr::as_file_handle error message
Ralf Jung [Thu, 13 Aug 2020 12:00:10 +0000 (14:00 +0200)]
fix Stderr::as_file_handle error message

3 years agoAuto merge of #1509 - samrat:fd-trait-fixes, r=RalfJung
bors [Thu, 13 Aug 2020 11:57:46 +0000 (11:57 +0000)]
Auto merge of #1509 - samrat:fd-trait-fixes, r=RalfJung

Remove lifetime from FileDescriptor trait

Also:
- Type annotate `handles` declaration, instead of annotating every insert.
- Add note about flush being unnecessary when writing to stderr

Addresses comments in #1495 and #1497

3 years agoRemove unnecessary whitespace
Samrat Man Singh [Thu, 13 Aug 2020 10:48:08 +0000 (16:18 +0530)]
Remove unnecessary whitespace

Co-authored-by: Ralf Jung <post@ralfj.de>
3 years agoRemove lifetime from FileDescriptor trait
Samrat Man Singh [Thu, 13 Aug 2020 09:31:52 +0000 (15:01 +0530)]
Remove lifetime from FileDescriptor trait

Also:
- Remove type annotate `handles` declaration instead of every insert.
- Add note about flush being unnecessary when writing to stderr

3 years agoAuto merge of #1504 - RalfJung:ill-formed-const, r=RalfJung
bors [Thu, 13 Aug 2020 06:44:00 +0000 (06:44 +0000)]
Auto merge of #1504 - RalfJung:ill-formed-const, r=RalfJung

add test for unused ill-formed constant

Once https://github.com/rust-lang/rust/pull/75339 lands, this test should pass.

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

3 years agorustup
Ralf Jung [Thu, 13 Aug 2020 06:43:28 +0000 (08:43 +0200)]
rustup

3 years agoadd test for unused ill-formed constant
Ralf Jung [Mon, 10 Aug 2020 07:04:37 +0000 (09:04 +0200)]
add test for unused ill-formed constant

also use better span in TopFrameInfo

3 years agoAuto merge of #1507 - rust-lang:get_static, r=RalfJung
bors [Wed, 12 Aug 2020 07:19:59 +0000 (07:19 +0000)]
Auto merge of #1507 - rust-lang:get_static, r=RalfJung

Bump for rustc changes

rustc-side: https://github.com/rust-lang/rust/pull/75394

3 years agorustup
Ralf Jung [Wed, 12 Aug 2020 07:19:40 +0000 (09:19 +0200)]
rustup

3 years agoBump for rustc changes
Oliver Scherer [Tue, 11 Aug 2020 09:37:29 +0000 (11:37 +0200)]
Bump for rustc changes

3 years agoAuto merge of #1506 - RalfJung:test-isolation, r=RalfJung
bors [Mon, 10 Aug 2020 08:24:56 +0000 (08:24 +0000)]
Auto merge of #1506 - RalfJung:test-isolation, r=RalfJung

make sure opening a file fails with isolation enabled

3 years agomake sure opening a file fails with isolation enabled
Ralf Jung [Mon, 10 Aug 2020 08:10:08 +0000 (10:10 +0200)]
make sure opening a file fails with isolation enabled

3 years agoAuto merge of #1503 - RalfJung:post-mono, r=RalfJung
bors [Mon, 10 Aug 2020 07:04:20 +0000 (07:04 +0000)]
Auto merge of #1503 - RalfJung:post-mono, r=RalfJung

accept some post-monomorphization errors

For https://github.com/rust-lang/miri/issues/1382, we also need to allow `ReferencedConstant` post-monomorphization errors. The other post-monomorphization errors should still be impossible to trigger in Miri. The fix is not complete though without https://github.com/rust-lang/rust/pull/75339.

3 years agoaccept ReferencedConstant errors in Miri (can happen post-monomorphization)
Ralf Jung [Mon, 10 Aug 2020 07:02:45 +0000 (09:02 +0200)]
accept ReferencedConstant errors in Miri (can happen post-monomorphization)

3 years agoAuto merge of #1502 - RalfJung:isolation, r=RalfJung
bors [Sat, 8 Aug 2020 13:25:25 +0000 (13:25 +0000)]
Auto merge of #1502 - RalfJung:isolation, r=RalfJung

fs: move isolation handling to inside trait

3 years agofs: move isolation handling to inside trait
Ralf Jung [Sat, 8 Aug 2020 13:21:04 +0000 (15:21 +0200)]
fs: move isolation handling to inside trait

3 years agoAuto merge of #1501 - samrat:fix-fs-error-handling, r=RalfJung
bors [Sat, 8 Aug 2020 12:28:08 +0000 (12:28 +0000)]
Auto merge of #1501 - samrat:fix-fs-error-handling, r=RalfJung

Bubble up errors from FileDescriptor::as_file_handle

Instead of indicating incorrectly that a handle was not found, return the error from `as_file_handle` indicating the operation is not supported on the FD.

Addresses some comments in #1495

3 years agoAuto merge of #1500 - RalfJung:rustup, r=RalfJung
bors [Sat, 8 Aug 2020 12:05:31 +0000 (12:05 +0000)]
Auto merge of #1500 - RalfJung:rustup, r=RalfJung

rustup

Adjust for https://github.com/rust-lang/rust/pull/74932.
Blocked on https://github.com/rust-lang/rust/pull/75282.

3 years agorustup
Ralf Jung [Sat, 8 Aug 2020 08:27:23 +0000 (10:27 +0200)]
rustup

3 years agoFix handling of as_file_handle error for `fullfsync`
Samrat Man Singh [Sat, 8 Aug 2020 11:58:41 +0000 (17:28 +0530)]
Fix handling of as_file_handle error for `fullfsync`

3 years agoAdd FIXME's for `dup` and other syscalls to support stdin/out/err
Samrat Man Singh [Sat, 8 Aug 2020 09:38:29 +0000 (15:08 +0530)]
Add FIXME's for `dup` and other syscalls to support stdin/out/err

3 years agoBubble up error from FileDescriptor::as_file_handle
Samrat Man Singh [Sat, 8 Aug 2020 09:12:50 +0000 (14:42 +0530)]
Bubble up error from FileDescriptor::as_file_handle

...instead of handle_not_found

3 years agoAuto merge of #1498 - RalfJung:rustup, r=RalfJung
bors [Wed, 5 Aug 2020 11:39:07 +0000 (11:39 +0000)]
Auto merge of #1498 - RalfJung:rustup, r=RalfJung

rustup

The allocator API changed *again*, adjust our test.

3 years agorustup
Ralf Jung [Wed, 5 Aug 2020 11:38:15 +0000 (13:38 +0200)]
rustup

3 years agoAuto merge of #1497 - samrat:posix-fs-refactor, r=oli-obk
bors [Tue, 4 Aug 2020 15:40:56 +0000 (15:40 +0000)]
Auto merge of #1497 - samrat:posix-fs-refactor, r=oli-obk

Add `impl FileDescriptor` for stdin, stdout, stderr

- Use `FileDescriptor::read` for stdin reads
- Use `FileDescriptor::write` for stdout/err writes
- Handle stdout/err reads in `FileDescriptor::read`

The `FileDescriptor` trait was added in PR #1495

Closes #1486

3 years agoFlush to stdout from FileDescriptor::write for `Stdout`
Samrat Man Singh [Tue, 4 Aug 2020 15:10:48 +0000 (20:40 +0530)]
Flush to stdout from FileDescriptor::write for `Stdout`

Also, remove unnecessary `-Zmiri-disable-isolation` in test

3 years agoAdd `impl FileDescriptor` for stdin, stdout, stderr
Samrat Man Singh [Sat, 1 Aug 2020 11:38:28 +0000 (17:08 +0530)]
Add `impl FileDescriptor` for stdin, stdout, stderr

- Use `FileDescriptor::read` for stdin reads
- Use `FileDescriptor::write` for stdout/err writes
- Handle stdout/err reads in `FileDescriptor::read`

3 years agoAuto merge of #1495 - samrat:fd-trait, r=oli-obk
bors [Mon, 3 Aug 2020 15:50:30 +0000 (15:50 +0000)]
Auto merge of #1495 - samrat:fd-trait, r=oli-obk

Add FileDescriptor trait to abstract fn's on File's and Stdin,Stdout,Stderr

Related issue: #1486

Instead of mapping FDs to `FileHandle`, map them to a `FileDescriptor` trait object. The goal is to eventually have both `FileHandle` as well as `Stdin`, `Stdout` and `Stderr` implement this trait so that syscalls involving FDs can handle both `File`s as well as the standard IO streams.

This PR adds the `FileDescriptor` trait and an `impl` for `FileHandle`. I'll open a separate PR for implementing the trait for the standard IO streams.

3 years agoRemove unnecessary `clone()` on `writable`
Samrat Man Singh [Mon, 3 Aug 2020 15:09:09 +0000 (20:39 +0530)]
Remove unnecessary `clone()` on `writable`

3 years agoAuto merge of #1496 - RalfJung:rustup, r=RalfJung
bors [Mon, 3 Aug 2020 12:25:11 +0000 (12:25 +0000)]
Auto merge of #1496 - RalfJung:rustup, r=RalfJung

rustup; inner_deref has been stabilized

miri and cargo-miri now use no nightly features (except for miri's using `rustc_private`, of course) :D

3 years agorustup; inner_deref has been stabilized
Ralf Jung [Mon, 3 Aug 2020 12:20:46 +0000 (14:20 +0200)]
rustup; inner_deref has been stabilized

3 years agoWrap io::Result from `FileDescriptor::{read,write,seek}` in InterpResult
Samrat Man Singh [Mon, 3 Aug 2020 05:31:42 +0000 (11:01 +0530)]
Wrap io::Result from `FileDescriptor::{read,write,seek}` in InterpResult

The outer InterpResult will be used to indicate that a fn is not
implemented for a struct(eg. `write` for Stdin).

The inner io::Result is just the result from the read/write/seek.

3 years agoAdd FileDescriptor trait to abstract fn's on File's and Std{in,out,err}
Samrat Man Singh [Fri, 31 Jul 2020 17:23:35 +0000 (22:53 +0530)]
Add FileDescriptor trait to abstract fn's on File's and Std{in,out,err}

3 years agoAuto merge of #1494 - RalfJung:stack-unwind-top, r=RalfJung
bors [Sat, 1 Aug 2020 12:20:45 +0000 (12:20 +0000)]
Auto merge of #1494 - RalfJung:stack-unwind-top, r=RalfJung

test unwinding past topmost frame of a stack

This tests https://github.com/rust-lang/rust/pull/74984

3 years agotest unwinding past topmost frame of a stack
Ralf Jung [Fri, 31 Jul 2020 17:28:59 +0000 (19:28 +0200)]
test unwinding past topmost frame of a stack

3 years agorustup; fix linked_list test
Ralf Jung [Sat, 1 Aug 2020 12:18:52 +0000 (14:18 +0200)]
rustup; fix linked_list test

3 years agoAuto merge of #1493 - RalfJung:track-test, r=RalfJung
bors [Fri, 31 Jul 2020 17:25:34 +0000 (17:25 +0000)]
Auto merge of #1493 - RalfJung:track-test, r=RalfJung

test track_caller on trait objects

Adds a Miri-side test for https://github.com/rust-lang/rust/issues/74764.

3 years agotest track_caller on trait objects
Ralf Jung [Fri, 31 Jul 2020 16:30:07 +0000 (18:30 +0200)]
test track_caller on trait objects

3 years agoAuto merge of #1492 - RalfJung:rustup, r=RalfJung
bors [Thu, 30 Jul 2020 16:32:53 +0000 (16:32 +0000)]
Auto merge of #1492 - RalfJung:rustup, r=RalfJung

Rustup

Adjusting for @oli-obk' log changes.

While at it I also removed the `*_of_val` intrinsics that got moved to rustc (Cc @ecstatic-morse).

3 years agoremove upstreamed intrinsic impls
Ralf Jung [Thu, 30 Jul 2020 16:31:40 +0000 (18:31 +0200)]
remove upstreamed intrinsic impls

3 years agorustup
Ralf Jung [Thu, 30 Jul 2020 16:31:19 +0000 (18:31 +0200)]
rustup

3 years agoAuto merge of #1491 - RalfJung:xargo-check, r=RalfJung
bors [Wed, 29 Jul 2020 16:24:43 +0000 (16:24 +0000)]
Auto merge of #1491 - RalfJung:xargo-check, r=RalfJung

only check-build the dummy xargo project

No reason to actually emit any object code.
This helps with some strange ICEs when testing Miri in the rustc workspace.

3 years agoonly check-build the dummy xargo project
Ralf Jung [Wed, 29 Jul 2020 16:21:32 +0000 (18:21 +0200)]
only check-build the dummy xargo project

3 years agoAuto merge of #1490 - RalfJung:rustup, r=RalfJung
bors [Wed, 29 Jul 2020 12:27:45 +0000 (12:27 +0000)]
Auto merge of #1490 - RalfJung:rustup, r=RalfJung

rustup for new folder layout

Fixes the fallout from https://github.com/rust-lang/rust/pull/73265.

Blocked on a xargo release with https://github.com/japaric/xargo/pull/301.

3 years agorustup for new folder layout
Ralf Jung [Tue, 28 Jul 2020 12:00:33 +0000 (14:00 +0200)]
rustup for new folder layout

3 years agoAuto merge of #1489 - RalfJung:tls-alloc-ids, r=oli-obk
bors [Mon, 27 Jul 2020 22:00:15 +0000 (22:00 +0000)]
Auto merge of #1489 - RalfJung:tls-alloc-ids, r=oli-obk

Adjust for new rustc alloc ID handling and deallocate thread-local statics

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

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

3 years agorustup and test fixes
Ralf Jung [Mon, 27 Jul 2020 21:40:27 +0000 (23:40 +0200)]
rustup and test fixes

3 years agoTypos
Ralf Jung [Mon, 27 Jul 2020 12:10:31 +0000 (14:10 +0200)]
Typos

Co-authored-by: Oliver Scherer <github35764891676564198441@oli-obk.de>
3 years agofix diagnostics printing when triggered during TLS dtor scheduling
Ralf Jung [Mon, 27 Jul 2020 11:10:11 +0000 (13:10 +0200)]
fix diagnostics printing when triggered during TLS dtor scheduling

3 years agodeallocate thread-local statics when the thread dies
Ralf Jung [Mon, 27 Jul 2020 10:53:39 +0000 (12:53 +0200)]
deallocate thread-local statics when the thread dies

3 years agofix and test order of TLS dtors and thread joining
Ralf Jung [Sun, 26 Jul 2020 13:53:02 +0000 (15:53 +0200)]
fix and test order of TLS dtors and thread joining

3 years agotest referencing unsupported extern static
Ralf Jung [Sun, 26 Jul 2020 13:55:15 +0000 (15:55 +0200)]
test referencing unsupported extern static

3 years agoget_or_create_thread_local_alloc_id: share code with Memory::get_global_alloc
Ralf Jung [Sun, 26 Jul 2020 10:11:27 +0000 (12:11 +0200)]
get_or_create_thread_local_alloc_id: share code with Memory::get_global_alloc

3 years agoadjust to canonical_alloc_id removal
Ralf Jung [Sun, 26 Jul 2020 09:15:01 +0000 (11:15 +0200)]
adjust to canonical_alloc_id removal

3 years agoAuto merge of #1487 - pnadon:miri-rename-undef-uninit, r=RalfJung
bors [Mon, 27 Jul 2020 21:31:51 +0000 (21:31 +0000)]
Auto merge of #1487 - pnadon:miri-rename-undef-uninit, r=RalfJung

Miri rename undef uninit

The changes made here are related to [issue #71193 on Rust](https://github.com/rust-lang/rust/issues/71193), and the pull request [74664 on Rust](https://github.com/rust-lang/rust/pull/74664).

1. renamed `ScalarMaybeUninit::not_undef` to `check_init`
2. renamed `Immediate::to_scalar_or_undef` to `Immediate::to_scalar_or_uninit`

3 years agoChanged not_undef to check_init in foreign_items.rs
Philippe Nadon [Mon, 27 Jul 2020 19:07:25 +0000 (13:07 -0600)]
Changed not_undef to check_init in foreign_items.rs

Due to changes from upstream, a commit using not_undef was inserted, which had to be updated to use check_init.

related issue #71193

3 years agoUpdated Rust version to latest master
Phil Nadon [Sun, 26 Jul 2020 13:54:24 +0000 (07:54 -0600)]
Updated Rust version to latest master

Updated Rust version since the latest version contains changes which allow this version of Miri to build.

3 years agorenamed Immediate::to_scalar_or_undef
Philippe Nadon [Thu, 23 Jul 2020 16:28:00 +0000 (10:28 -0600)]
renamed Immediate::to_scalar_or_undef

to Immediate::to_scalar_or_uninit

in src/shims/intrinsics.rs

related issue #71193

3 years agorenamed ScalarMaybeUninit::not_undef to check_init
Philippe Nadon [Thu, 23 Jul 2020 15:50:45 +0000 (09:50 -0600)]
renamed ScalarMaybeUninit::not_undef to check_init

Related to PR https://github.com/rust-lang/rust/pull/74664

4 years agoAuto merge of #1485 - RalfJung:miri-extern-fn, r=oli-obk
bors [Sat, 25 Jul 2020 08:02:54 +0000 (08:02 +0000)]
Auto merge of #1485 - RalfJung:miri-extern-fn, r=oli-obk

 Miri: use extern fn to expose interpreter operations to program; fix leak checker on Windows

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

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

4 years agoupdate rust-version
Ralf Jung [Sat, 25 Jul 2020 08:02:25 +0000 (10:02 +0200)]
update rust-version

4 years agodocument Miri extern functions
Ralf Jung [Thu, 23 Jul 2020 15:14:25 +0000 (17:14 +0200)]
document Miri extern functions

4 years agoenable leak check tests on Windows
Ralf Jung [Thu, 23 Jul 2020 13:49:22 +0000 (15:49 +0200)]
enable leak check tests on Windows

4 years agoadd a Miri extern fn to mark an allocation as being a static root for leak checking
Ralf Jung [Thu, 23 Jul 2020 13:47:33 +0000 (15:47 +0200)]
add a Miri extern fn to mark an allocation as being a static root for leak checking

4 years agomake miri_start_panic intrinsic an FFI function
Ralf Jung [Thu, 23 Jul 2020 13:20:36 +0000 (15:20 +0200)]
make miri_start_panic intrinsic an FFI function

4 years agoAuto merge of #1482 - canova:remote-unreachable, r=RalfJung
bors [Thu, 23 Jul 2020 09:14:08 +0000 (09:14 +0000)]
Auto merge of #1482 - canova:remote-unreachable, r=RalfJung

Remove unreachable intrinsic

This is now supported by the interpreter with https://github.com/rust-lang/rust/pull/74459. We can remove this intrinsic implementation here.
This is covered by this test: https://github.com/rust-lang/miri/blob/master/tests/compile-fail/unreachable.rs

I guess we need to wait until the rust-lang/rust PR merges into nightly, and then we can update `rust-version` hash in the PR, right?

r? @oli-obk

4 years agoAuto merge of #1484 - RalfJung:rustup, r=RalfJung
bors [Thu, 23 Jul 2020 08:41:34 +0000 (08:41 +0000)]
Auto merge of #1484 - RalfJung:rustup, r=RalfJung

rustup

Following https://github.com/rust-lang/rust/pull/69749 I added some `ty::ParamEnv::reveal_all()` even though @eddyb advised me in the past to avoid those.

4 years agorustup
Ralf Jung [Thu, 23 Jul 2020 08:40:13 +0000 (10:40 +0200)]
rustup

4 years agoAuto merge of #1483 - RalfJung:fs-errno, r=RalfJung
bors [Sat, 18 Jul 2020 15:59:19 +0000 (15:59 +0000)]
Auto merge of #1483 - RalfJung:fs-errno, r=RalfJung

set errno on stdout write failure

4 years agoset errno on stdout write failure
Ralf Jung [Sat, 18 Jul 2020 15:58:16 +0000 (17:58 +0200)]
set errno on stdout write failure

4 years agoAuto merge of #1436 - samrat:support-stdin-read, r=RalfJung
bors [Sat, 18 Jul 2020 14:56:38 +0000 (14:56 +0000)]
Auto merge of #1436 - samrat:support-stdin-read, r=RalfJung

Handle `read`s on STDIN

Closes #1434

4 years agoRemove unreachable intrinsic
Nazım Can Altınova [Sat, 18 Jul 2020 10:48:26 +0000 (12:48 +0200)]
Remove unreachable intrinsic

4 years agoRemove unnecessary cast
Samrat Man Singh [Sat, 18 Jul 2020 05:15:06 +0000 (10:45 +0530)]
Remove unnecessary cast

4 years agoEnsure buffer for reading from Stdin is smaller than machine usize
Samrat Man Singh [Thu, 16 Jul 2020 18:33:56 +0000 (00:03 +0530)]
Ensure buffer for reading from Stdin is smaller than machine usize

Also, set appropriate error code on failure

4 years agoAuto merge of #1480 - RalfJung:diagnostic-stacktrace-fix, r=oli-obk
bors [Fri, 17 Jul 2020 11:40:40 +0000 (11:40 +0000)]
Auto merge of #1480 - RalfJung:diagnostic-stacktrace-fix, r=oli-obk

fix non-fatal diagnostics stacktraces

Our non-fatal diagnostics are printed *after* completing the step that triggered them, which means the span and stacktrace used for them is that of the *next* MIR statement being executed. That's quite bad, obviously, as pointing to where in the source something happens is their entire point.

Here's an example:
```rust
use std::ptr;

static mut PTR: *mut u8 = ptr::null_mut();

fn get_ptr() -> *const u8 { unsafe { PTR }}

fn cause_ub() { unsafe {
    let _x = &*get_ptr();
} }

fn main() { unsafe {
   let mut l = 0;
   PTR = &mut l;
   let r = &mut *PTR;
   cause_ub();
   let _x = *r;
} }
```
This example is UB; if you track the pointer tag that is given in the final error, it points to the entire body of `cause_ub` as a span, instead of the `&*get_ptr();`.

I am not sure what the best way is to fix this. The cleanest way would be to capture a stack trace before the step and use it in case of a diagnostic, but that seems silly perf-wise. So instead I went with reconstructing the old stacktrace by going back one step in the MIR. This is however not possible if we were executing a `Terminator`... I think those cannot cause diagnostics but still, this is not great.

Any ideas?
r? @oli-obk

4 years agofix typo
Ralf Jung [Fri, 17 Jul 2020 11:39:25 +0000 (13:39 +0200)]
fix typo

Co-authored-by: Oliver Scherer <github35764891676564198441@oli-obk.de>
4 years agofix non-fatal diagnostics stacktraces
Ralf Jung [Fri, 17 Jul 2020 10:54:38 +0000 (12:54 +0200)]
fix non-fatal diagnostics stacktraces

4 years agoAuto merge of #1479 - RalfJung:fs-nocast, r=RalfJung
bors [Thu, 16 Jul 2020 10:17:23 +0000 (10:17 +0000)]
Auto merge of #1479 - RalfJung:fs-nocast, r=RalfJung

fs: remove an unnecessary intermediate cast

4 years agoremove an unnecessary intermediate cast
Ralf Jung [Thu, 16 Jul 2020 10:16:43 +0000 (12:16 +0200)]
remove an unnecessary intermediate cast

4 years agoAuto merge of #1478 - RalfJung:readme, r=RalfJung
bors [Wed, 15 Jul 2020 08:10:02 +0000 (08:10 +0000)]
Auto merge of #1478 - RalfJung:readme, r=RalfJung

make cfg(miri) greppable

4 years agomake cfg(miri) greppable
Ralf Jung [Wed, 15 Jul 2020 08:09:28 +0000 (10:09 +0200)]
make cfg(miri) greppable

4 years agoAuto merge of #1477 - RalfJung:rustup, r=RalfJung
bors [Wed, 15 Jul 2020 06:43:14 +0000 (06:43 +0000)]
Auto merge of #1477 - RalfJung:rustup, r=RalfJung

rustup; fix Windows TLS

4 years agorustup; fix Windows TLS
Ralf Jung [Wed, 15 Jul 2020 06:42:15 +0000 (08:42 +0200)]
rustup; fix Windows TLS

4 years agoRead into buffer of fixed size for `read`s to STDIN
Samrat Man Singh [Sun, 12 Jul 2020 14:57:19 +0000 (20:27 +0530)]
Read into buffer of fixed size for `read`s to STDIN

Also:
- Check isolation is disabled.
- Add FIXMEs to set error numbers in `read` and `write`.

4 years agoAuto merge of #1475 - RalfJung:dangcast, r=RalfJung
bors [Sat, 11 Jul 2020 18:57:28 +0000 (18:57 +0000)]
Auto merge of #1475 - RalfJung:dangcast, r=RalfJung

test casting a dangling ptr back from an int

4 years agotest casting a dangling ptr back from an int
Ralf Jung [Sat, 11 Jul 2020 18:56:47 +0000 (20:56 +0200)]
test casting a dangling ptr back from an int

4 years agoAuto merge of #1474 - RalfJung:canonical, r=RalfJung
bors [Sat, 11 Jul 2020 09:08:03 +0000 (09:08 +0000)]
Auto merge of #1474 - RalfJung:canonical, r=RalfJung

go back to using canonicalize()

Newer xargo should hopefully work with the paths this produces on Windows.

4 years agogo back to using canonicalize()
Ralf Jung [Sat, 11 Jul 2020 09:07:17 +0000 (11:07 +0200)]
go back to using canonicalize()

4 years agoHandle `read`s on STDIN
Samrat Man Singh [Thu, 28 May 2020 05:54:47 +0000 (11:24 +0530)]
Handle `read`s on STDIN

4 years agoAuto merge of #1473 - Stupremee:no-ice-if-no-main-fn, r=oli-obk
bors [Thu, 9 Jul 2020 15:35:28 +0000 (15:35 +0000)]
Auto merge of #1473 - Stupremee:no-ice-if-no-main-fn, r=oli-obk

Early exit if program doesn't contain a main function

Resolves #1452

4 years agoMove no_main test to compile-fail
Justus K [Thu, 9 Jul 2020 15:21:09 +0000 (17:21 +0200)]
Move no_main test to compile-fail

4 years agoAdd ui test for early exiting if no main
Justus K [Thu, 9 Jul 2020 12:08:45 +0000 (14:08 +0200)]
Add ui test for early exiting if no main

4 years agoEarly exit if program doesn't contain a main fn
Justus K [Thu, 9 Jul 2020 11:16:38 +0000 (13:16 +0200)]
Early exit if program doesn't contain a main fn

4 years agoAuto merge of #1472 - RalfJung:abs, r=RalfJung
bors [Thu, 9 Jul 2020 11:03:15 +0000 (11:03 +0000)]
Auto merge of #1472 - RalfJung:abs, r=RalfJung

better way to get an absolute path

suggested by @matklad

4 years agoCleanup code
Ralf Jung [Thu, 9 Jul 2020 11:02:42 +0000 (13:02 +0200)]
Cleanup code

Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>