Commit Graph

456 Commits

Author SHA1 Message Date
Christian Poveda
afc6713e41 Reorganize shims::env::EnvVars 2019-08-13 16:17:41 -05:00
Christian Poveda
666cd22fa6 Wrap hashmap for env vars in its own type 2019-08-13 11:34:43 -05:00
Ralf Jung
95fb11d51f make TLS state private to TLS module 2019-08-13 09:29:01 +02:00
Ralf Jung
04892d9155 typo 2019-08-10 11:33:33 +02:00
Ralf Jung
0743ed631e clamp ldexp exponent to i16 2019-08-10 11:27:27 +02:00
Ralf Jung
3ae01a64bc also support scalbn itself 2019-08-10 11:22:32 +02:00
Ralf Jung
5e3035b6cb use apfloat for ldexp 2019-08-09 19:54:01 +02:00
Christian Poveda
e1d1cd191f Use ldexp from cmath instead 2019-08-08 15:45:58 -05:00
Christian Poveda
253af9692a Fix formatting 2019-08-07 10:50:46 -05:00
Ralf Jung
455531c564 Revert "uninit intrinsic is gone"
This reverts commit fa290f1a48.
Uninit is being reinstated because it breaks some broken code.
2019-08-07 10:49:36 +02:00
Christian Poveda
b731a6a15f Add support for env communication 2019-08-06 17:40:07 -05:00
Ralf Jung
d26917a9d6 fix for latest rustc 2019-08-05 10:45:48 +02:00
bors
93e110f370 Auto merge of #886 - Aaron1011:shim/getrandom, r=RalfJung
Shim 'libc::getrandom' in addition to 'libc::syscall(libc::SYS_getrandom)'
2019-08-04 21:02:08 +00:00
Aaron Hill
f830a6c69e
Apply more formatting fixes
Co-Authored-By: Ralf Jung <post@ralfj.de>
2019-08-04 16:57:17 -04:00
Aaron Hill
8650f02bc9
Add trailing comma 2019-08-04 16:12:24 -04:00
Aaron Hill
56a9a283e7
Cleanup formatting 2019-08-04 16:12:24 -04:00
Aaron Hill
a2bdb3bb94
Shim 'libc::getrandom' in addition to 'libc::syscall(libc::SYS_getrandom)' 2019-08-04 16:12:23 -04:00
Aaron Hill
3118b9fe42
Add misssing 'roundf32' and 'roundf64' intrinsics 2019-08-04 10:25:29 -04:00
Ralf Jung
0096a0df2a gen_random helper: move ptr argument to front 2019-08-04 14:49:10 +02:00
Ralf Jung
a4cc58efc6 one more place -> ptr rename 2019-08-04 10:54:07 +02:00
Ralf Jung
19add0bb75 places and pointers are not the same thing; this is a place 2019-08-04 10:52:09 +02:00
Ralf Jung
f47e58950b check that atomics are sufficiently aligned, and add test 2019-08-04 10:30:42 +02:00
bors
d9d6df93a9 Auto merge of #881 - RalfJung:rustup, r=RalfJung
adjust for rustc changes
2019-08-03 18:56:38 +00:00
Ralf Jung
8d99e42f47 test memalign contract (rustc is fixed) 2019-08-03 20:53:42 +02:00
Ralf Jung
f65e7cd2d1 adjust for rustc changes 2019-08-03 20:31:33 +02:00
bors
d0e8850267 Auto merge of #877 - christianpoveda:ldexp-shim, r=RalfJung
Add shim for ldexp

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

r? @RalfJung
2019-08-03 16:14:20 +00:00
Christian Poveda
c4cea035e6 Formatting 2019-08-03 10:51:23 -05:00
Ralf Jung
61d8a4e101 simplify code 2019-08-03 15:01:04 +02:00
Ralf Jung
8071034b93 fix for error refactoring 2019-08-03 10:25:55 +02:00
Christian Poveda
ff2001040f Add shim for ldexp 2019-08-02 15:46:28 -05:00
Lzu Tao
fd71fbea0f build: Fix build after rust-lang/rust#60951 2019-07-24 07:45:34 +07:00
Ralf Jung
a2541aacd6 bump rust 2019-07-21 11:56:10 +02:00
Ralf Jung
f8c6eb5e8c thread creation error for Windows 2019-07-11 18:59:11 +02:00
Ralf Jung
f79f31dfa1 adjust for rustc changes; normalize mplace before doing freeze-sensitive visit 2019-07-10 14:36:56 +02:00
Lzu Tao
3ea62d3527 Remove SliceConcatExt import 2019-07-10 09:56:35 +07:00
bors
e4a98ea8d8 Auto merge of #826 - RalfJung:uninit, r=RalfJung
uninit intrinsic is gone

Finally. :D

However, to land this we'll need to fix the intptrcast issues that block https://github.com/rust-lang/miri/pull/803.
2019-07-06 09:40:51 +00:00
Ralf Jung
47bfc62b5b use Memory::read_c_str, avoid a few to_ptr 2019-07-06 11:01:07 +02:00
Ralf Jung
4fa243be78 adjust for get_fn signature change 2019-07-06 10:07:22 +02:00
Ralf Jung
8093a59ffb move gen_random to helpers 2019-07-06 10:07:21 +02:00
Ralf Jung
4f6a56f54f better error message when the program tries to spawn a thread 2019-07-06 10:07:21 +02:00
Ralf Jung
2ca1b94e6d update to FnVal changes; implement basic Dlsym support and use it for getentropy 2019-07-06 10:07:21 +02:00
Ralf Jung
fa290f1a48 uninit intrinsic is gone 2019-07-06 10:06:45 +02:00
Ralf Jung
b324cbf282 Merge remote-tracking branch 'origin/master' into rustup 2019-07-06 09:29:17 +02:00
Ralf Jung
1729965808 rename InterpretCx -> InterpCx 2019-07-05 23:48:51 +02:00
Ralf Jung
f23b782101 align small malloc-allocations even less, and test that we do 2019-07-05 23:48:48 +02:00
Ralf Jung
89696a4ab9 Merge remote-tracking branch 'origin/master' 2019-07-05 22:46:11 +02:00
Ralf Jung
aad5fde703 fix deallocating/reallocating with integer pointers 2019-07-05 19:21:21 +02:00
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
Ralf Jung
93c62a4912 move tls.rs into shims module 2019-07-03 23:12:44 +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
b8879f3d8c move shims (foreign items and intrinsics) into submodule 2019-06-30 15:35:28 +02:00