Ralf Jung
698b311a59
fix NULL in TLS dtors
2019-07-05 10:08:57 +02:00
Ralf Jung
07d5e9917c
avoid Scalar::is_null_ptr, it is going away
2019-07-05 09:56:42 +02:00
bors
3525943794
Auto merge of #822 - RalfJung:tls, r=RalfJung
...
move tls.rs into shims module
2019-07-04 08:51:19 +00:00
Ralf Jung
93c62a4912
move tls.rs into shims module
2019-07-03 23:12:44 +02:00
Ralf Jung
b29cb7d551
avoid catching errors
2019-07-03 10:56:25 +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
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
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
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
b8879f3d8c
move shims (foreign items and intrinsics) into submodule
2019-06-30 15:35:28 +02: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
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
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
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
Ralf Jung
6886864862
ptr-to-int alignment sanity check
2019-06-28 09:12:11 +02:00
Christian Poveda
7fbf8e53a2
Fix alignment of base addresses
2019-06-26 09:08:28 -05: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
Christian Poveda
2861ceb2fa
Rename new fields and move rng to MemoryExtra
2019-06-24 10:03:16 -05:00
Ralf Jung
7e7b5d42ba
Apply suggestions from code review
...
Co-Authored-By: Oliver Scherer <github35764891676564198441@oli-obk.de>
2019-06-24 14:50:27 +02:00
Ralf Jung
69e8318b60
de-obfuscate ptr comparison a bit
2019-06-23 20:30:33 +02:00
Ralf Jung
4dc188a60e
adjust for refactored memory pointer checks
2019-06-23 20:19:26 +02:00
Christian Poveda
dd732e5862
Force intptrcast for binary operations
2019-06-22 09:25:16 -05:00
Ralf Jung
72c269eebe
fix compilation with latest rustc
2019-06-22 11:05:12 +02:00
Christian Poveda
fd3a291db4
Implement intptrcast methods
2019-06-21 14:55:37 -05:00
Oliver Scherer
5edb9c915f
Merge branch 'master' into master
2019-06-21 12:37:13 +02:00
Christian Poveda
17dbecfa32
Merge branch 'master' into master
2019-06-20 21:38:10 -05:00
Christian Poveda
4211d7e1a0
Update tag methods to match Machine changes
2019-06-20 16:58:57 -05:00
Ralf Jung
86868b6946
Merge branch 'master' into rustup
2019-06-20 21:37:12 +02:00
Ralf Jung
6f5529a05b
Merge branch 'master' into patch-1
2019-06-20 20:47:27 +02:00
Ralf Jung
03eff5981b
use org.rust-lang.miri folder on macOS
2019-06-20 19:45:39 +02:00
Ralf Jung
04fa38dd1b
allow some inequality comparisons between pointers and integers
2019-06-20 16:38:55 +02:00
Ralf Jung
7ce36226e6
implement and test unchecked_{add,sub,mul} intrinsics
2019-06-16 11:10:33 +02:00
Ralf Jung
fc90124489
test exact_div UB detection
2019-06-16 11:10:33 +02:00
Ralf Jung
32a2cf046f
Merge branch 'master' into foreign_math_functions
2019-06-16 10:11:32 +02:00
soc
a561f949ad
Fix project dirs path
...
ProjectDirs::from("miri", "miri", "miri")
would get you `miri\miri` on Windows and `miri.miri.miri` on macOS.
I'm assuming here that your intention was to have only a `miri` directory on every OS.
2019-06-15 17:03:16 +02:00
Lzu Tao
fd0dccd4b1
Fix wrong lifetime of TyCtxt
...
Rustup rust-lang/rust#61817
2019-06-15 02:34:11 +07:00