Commit Graph

3003 Commits

Author SHA1 Message Date
Christian Poveda
8dfb278ac5 Fix explicit cast test 2019-07-03 15:59:32 -05:00
Christian Poveda
39d383d9e7 Update rust-version 2019-07-03 13:38:39 -05:00
Christian Poveda
074e20eb7b Add intptrcast test for explicit casts 2019-07-03 13:38:39 -05:00
bors
ce5e910e60 Auto merge of #820 - RalfJung:intptrcast, r=RalfJung
Make most tests work with Intptrcast

The one that still fails (amusingly, that's ptr_int_casts) requires some help from the librustc_mir side.
2019-07-03 17:13:09 +00:00
Ralf Jung
b29cb7d551 avoid catching errors 2019-07-03 10:56:25 +02:00
Ralf Jung
8ec25066e7 make a test noseed for now that does not work with intptrcast yet 2019-07-03 10:47:28 +02:00
Ralf Jung
eb4128fb42 don't call Stacked Borrows hooks at all when validation is disabled 2019-07-03 10:47:28 +02:00
Ralf Jung
c8450bda4f support integers that can be cast to pointers in in-bounds offset operation 2019-07-03 10:47:28 +02:00
Ralf Jung
c3da843ca0 we don't need zero-sized freeze-sensitive visiting 2019-07-03 10:47:28 +02:00
Ralf Jung
12b8d4366c avoid integer overflow in ptr-to-int cast 2019-07-03 10:47:28 +02:00
Ralf Jung
c6e4f760a2 allow dangling ptr-to-int casts; use force_bits for ptr comparison 2019-07-03 10:47:28 +02:00
Ralf Jung
457c823765 only treat integer operations as such 2019-07-03 10:47:28 +02:00
Ralf Jung
44298d86f0 dont add the -Zmiri-seed flag twice 2019-07-03 10:47:25 +02:00
Ralf Jung
ccbc035f6a run all run-pass tests with intrptrcast. makes many of them fail! 2019-07-02 22:20:37 +02:00
bors
39c9e793b9 Auto merge of #819 - RalfJung:test-name, r=RalfJung
fix outdated test name: overalign -> align
2019-07-02 11:03:22 +00:00
Ralf Jung
8d8481fed5 fix outdated test name: overalign -> align 2019-07-02 13:02:48 +02:00
bors
842a8b6a79 Auto merge of #818 - RalfJung:readme, r=RalfJung
add another bug we found to the list
2019-07-02 07:51:55 +00:00
Ralf Jung
e8e42ab5ec add another bug we found to the list 2019-07-02 09:51:16 +02:00
bors
93f5892962 Auto merge of #815 - RalfJung:memory-audit, r=RalfJung
don't call Memory::get without checking the pointer first

Also avoid Memory::get if we just need to know align/size.

I audited all uses of `alloc_id`; the rest should be fine (and we can kill a bunch of them once https://github.com/rust-lang/rust/pull/62257 lands).
2019-07-01 20:59:17 +00:00
bors
10af3871c9 Auto merge of #814 - RalfJung:shims, r=RalfJung
move find_fn (which is not specific to foreign items) out of foreign_item
2019-07-01 13:42:33 +00:00
bors
d2df509867 Auto merge of #816 - RalfJung:gitattr, r=RalfJung
be explicit about our line endings

Let's see if this is the right setting for Windows...
2019-07-01 12:31:57 +00:00
Ralf Jung
e82693fa23 Merge branch 'master' into rustup 2019-07-01 13:01:28 +02:00
Ralf Jung
b04452223a be explicit about our line endings 2019-07-01 11:05:57 +02:00
Ralf Jung
7b702b9258 move find_fn (which is not specific to foreign items) out of foreign_items 2019-07-01 00:28:31 +02:00
Ralf Jung
4135441137 don't call Memory::get without checking the pointer first; avoid Memory::get if we just need to know align/size 2019-07-01 00:24:56 +02:00
bors
2a4c4ade30 Auto merge of #809 - RalfJung:intptrcast, r=RalfJung
use intptrcast for heap_allocator test; then it should work on Windows
2019-06-30 21:19:56 +00:00
Ralf Jung
cb6d4f0c9a test even more size-alignment combinations. found a bug in libstd! 2019-06-30 21:23:48 +02:00
Ralf Jung
709b474859 fix minimal alignment for system allocation functions 2019-06-30 21:10:47 +02:00
Ralf Jung
e960270662 add some tracing to intptrcast 2019-06-30 21:10:47 +02:00
Ralf Jung
a04890795d move appveyor env var settings to more appropriate section 2019-06-30 21:10:44 +02:00
Ralf Jung
78261b788d fix setting rustc flags 2019-06-30 19:10:09 +02:00
bors
72b2e1045d Auto merge of #806 - varkor:patch-1, r=RalfJung
Fix `unused_must_use` inside `Box`

After https://github.com/rust-lang/rust/pull/62228, this will be linted against (and causes the test to fail). (This blocks https://github.com/rust-lang/rust/pull/62228.)
2019-06-30 15:07:03 +00:00
Ralf Jung
0ea4b50025 Miri is not deterministic any more 2019-06-30 17:02:20 +02:00
Ralf Jung
b067313552 use intptrcast for heap_allocator test; then it should work on Windows 2019-06-30 16:56:16 +02:00
bors
aeb658e8bd Auto merge of #807 - RalfJung:test-name, r=RalfJung
better name for a test: threads -> sync
2019-06-30 14:46:03 +00:00
Ralf Jung
e44d38e051 improve comment 2019-06-30 16:45:41 +02:00
Ralf Jung
db6283b884 better name for a test: threads -> sync 2019-06-30 16:44:25 +02:00
varkor
5d4aae8c05
Fix unused_must_use inside Box
After https://github.com/rust-lang/rust/pull/62228, this will be linted against (and causes the test to fail).
2019-06-30 15:31:14 +01:00
bors
048b00d20f Auto merge of #805 - RalfJung:shims, r=RalfJung
move shims (foreign items and intrinsics) into submodule

This is in preparation for dlsym support, where there will b a third "kind" of shim.

And maybe some day we find a good way to split those long files...
2019-06-30 13:38:38 +00:00
Ralf Jung
b8879f3d8c move shims (foreign items and intrinsics) into submodule 2019-06-30 15:35:28 +02:00
bors
c29fd090f5 Auto merge of #804 - RalfJung:intptrcast, r=RalfJung
fix comparing function pointers with intptrcast

Cc @christianpoveda
2019-06-30 09:37:27 +00:00
Ralf Jung
11457a4ad9 fix comparing function pointers with intptrcast 2019-06-30 11:21:31 +02:00
bors
1ec279f290 Auto merge of #801 - RalfJung:num_cpus, r=RalfJung
support num_cpus crate and test that

Also make some magic numbers into proper global constants.
2019-06-30 08:42:25 +00:00
Ralf Jung
ba47d73041 Merge branch 'master' into rustup 2019-06-29 16:19:27 +02:00
bors
1522a47dce Auto merge of #795 - RalfJung:intptrcast, r=RalfJung
tweak inttoptr allocation behavior

- Make `align_addr` not offset by `align` for no reason.
- Add some random slack between allocations to give them the chance to not be aligned.

Cc @christianpoveda

Fixes https://github.com/rust-lang/miri/issues/791
2019-06-29 12:45:14 +00:00
Ralf Jung
019ad4bab4 move constants to machine.rs 2019-06-29 14:37:41 +02:00
Ralf Jung
c7bf9064f7 comment on STACK_ADDR 2019-06-29 14:34:08 +02:00
Ralf Jung
0fac868685 support num_cpus and test that 2019-06-29 14:34:08 +02:00
Ralf Jung
0bb50ada34 make sure we catch alignment problems even with intrptrcast 2019-06-29 14:31:54 +02:00
Ralf Jung
c1645f6c65 don't compute residue twice 2019-06-29 14:31:54 +02:00