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
Ralf Jung
9b66527075
more sensible slack
2019-06-29 14:31:54 +02:00
Ralf Jung
c0b44ca98c
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.
2019-06-29 14:31:54 +02:00
Ralf Jung
aa5a9bc152
some module comments
2019-06-29 14:15:05 +02:00
Ralf Jung
857305ff67
Merge remote-tracking branch 'ralf/machine' into rustup
2019-06-29 14:04:50 +02:00
bors
9e424753ba
Auto merge of #802 - RalfJung:machine, r=RalfJung
...
some lib.rs refactoring
Taken out of https://github.com/rust-lang/miri/pull/799 so that we can land it now and resolve merge conflicts instead of dragging them along.
Splits lib.rs into machine.rs for the machine state and trait impl, and eval.rs for the main evaluator loop and setting up the initial stack frame.
2019-06-29 11:52:02 +00:00
Ralf Jung
67d3779b0c
move most of the stuff from lib.rs into machine.rs, and initialization + main loop into eval.rs
2019-06-29 13:48:59 +02:00
bors
bc969f1a4c
Auto merge of #798 - RalfJung:format-ptr, r=RalfJung
...
test pointer string formatting
2019-06-28 18:43:30 +00:00
Ralf Jung
afe42625e5
test pointer string formatting
2019-06-28 20:42:00 +02:00
bors
3bf0655436
Auto merge of #796 - RalfJung:rand, r=RalfJung
...
bump rand to released 0.7
2019-06-28 09:31:23 +00:00