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
Ralf Jung
4df5c6ac83
bump rand to released 0.7
2019-06-28 11:29:24 +02:00
bors
b0ce6938bb
Auto merge of #794 - RalfJung:alignment-sanity, r=oli-obk
...
ptr-to-int alignment sanity check
2019-06-28 07:15:35 +00:00
Ralf Jung
6886864862
ptr-to-int alignment sanity check
2019-06-28 09:12:11 +02:00
bors
a4495fc8cb
Auto merge of #793 - jyn514:master, r=RalfJung
...
Show usage if run without arguments
Before, running `./miri` without arguments gave
'./miri: 92: shift: can't shift that many' if run with /bin/sh,
or no output at all when run with bash (because of the `set -e` at the top).
Although that gives some indication of the error, it's not as helpful as
showing the usage.
2019-06-28 06:29:10 +00:00
Joshua Nelson
38b947b953
Show usage if run without arguments
...
Before, running `./miri` without arguments gave
'./miri: 92: shift: can't shift that many' if run with /bin/sh,
or no output at all when run with bash.
Although that gives some indication of the error, it's not as helpful as
showing the usage.
2019-06-27 21:47:09 -04:00
Christian Poveda
373a4ee1e9
Remove default derive for MemoryExtra
2019-06-26 13:55:56 -05:00
Christian Poveda
413a351552
Initialize MemoryExtra with StdRng
2019-06-26 13:09:50 -05:00
bors
945f007c0d
Auto merge of #779 - christianpoveda:intptrcast-model, r=RalfJung,oli-obk
...
Implement intptrcast methods
cc https://github.com/rust-lang/miri/issues/224
2019-06-26 14:52:03 +00:00
Christian Poveda
7fbf8e53a2
Fix alignment of base addresses
2019-06-26 09:08:28 -05:00
bors
d1873b689d
Auto merge of #790 - RalfJung:readme, r=oli-obk
...
README: add snippet for running Miri on CI
2019-06-25 08:14:59 +00:00
Ralf Jung
7a6438ada6
add snippet for running Miri on CI
2019-06-25 10:05:34 +02:00
Christian Poveda
792d665a1f
Fix merge conflicts
2019-06-25 00:57:33 -05:00
Christian Poveda
84cfbb01b7
Reorganize MemoryExtra and AllocExtra structures
2019-06-24 17:18:25 -05:00
bors
2bd22c03eb
Auto merge of #787 - RalfJung:pointer-checks, r=RalfJung
...
adjust for refactored memory pointer checks
The Miri side of https://github.com/rust-lang/rust/pull/62081 .
2019-06-24 21:59:22 +00:00