Commit Graph

104 Commits

Author SHA1 Message Date
Ralf Jung
68ba6cdbaa fix for new Align type 2018-11-23 09:46:51 +01:00
Ralf Jung
6085865975 adjust for InboundsCheck parameter of memory bounds check 2018-11-20 08:45:25 +01:00
Ralf Jung
27b1f47b0a use crate:: where appropriate 2018-11-01 08:57:22 +01:00
Ralf Jung
01828fde53 respect memory's privacy 2018-10-22 16:48:10 +02:00
Ralf Jung
66b4bb7cf2 stacked borrows: track refs and derefs 2018-10-16 18:35:27 +02:00
Ralf Jung
b84f7e2029 add Borrow tag to pointers; remove old locking code 2018-10-16 18:35:27 +02:00
Ralf Jung
a439262859
Merge branch 'master' into ptr-offset 2018-10-10 10:03:34 +02:00
Ralf Jung
edf28fa227 only allow offset-by-0 on integer pointers 2018-10-09 20:13:46 +02:00
Ralf Jung
cc275c63a9 fix for fn allocations now having an alignment (1) and a size (0) 2018-10-08 13:35:54 +02:00
Ralf Jung
146f5d8d10 rustup; test for return type mismatch 2018-10-02 21:16:55 +02:00
Ralf Jung
18d7394071 more compile-fail ptr equality tests, to rule out any non-determinism; and fix ptr equality to fail all of them.
At least these are the cases I can think of right now.
2018-09-17 10:02:31 +02:00
Ralf Jung
d3928f6356 more permissive pointer comparison logic 2018-09-01 11:26:54 +02:00
Ralf Jung
2a318264ea also allow comparing pointers with integers so big that they cannot be equal 2018-08-30 11:05:52 +02:00
Ralf Jung
c44267960f ptr equality: only defined for ptrs in the same allocation and live ptrs 2018-08-30 10:46:09 +02:00
Ralf Jung
ee7f22245d Merge remote-tracking branch 'origin/master' 2018-08-20 18:57:48 +02:00
Ralf Jung
259cc6e3dc rustup for big refactor; kill most of validation 2018-08-16 10:30:43 +02:00
Ralf Jung
1179d4f8a4 fix int ptr ops on 32bit 2018-08-14 20:25:56 +02:00
Ralf Jung
04b925135d fix modulo logic 2018-08-14 20:10:25 +02:00
Ralf Jung
2b40d39c1e support computing the remainder of a ptr, if covered by alignment 2018-08-14 20:10:25 +02:00
Oliver Schneider
be91aea0fa Rustup 2018-08-07 15:22:11 +02:00
Ralf Jung
5be8bd987d Test some new capabilities we gained from a rustc update 2018-07-15 21:25:20 +02:00
bjorn3
52bf4732fd Fix some clippy lints 2018-07-10 17:32:38 +02:00
Oliver Schneider
062be7c047 Comparing non-pointer-size types should be possible 2018-06-03 13:08:51 +02:00
bjorn3
4143922d1d Partial rustup 2018-06-03 13:08:51 +02:00
bjorn3
98802769a1 Rustup to rustc 1.28.0-nightly (a3085756e 2018-05-19) 2018-06-03 13:08:51 +02:00
Oliver Schneider
27fe263669
Move back to a normal folder structure 2018-05-09 14:37:00 +02:00
Oliver Schneider
4cfa7c5d12
Prep miri repository for rustc merger 2017-07-21 11:30:56 +02:00
Oliver Schneider
03f0a88002
Use a wrapper type to differentiate between PrimVal and pointers 2017-07-11 12:28:11 +02:00
Oliver Schneider
2d52054fb2
Rename Pointer to MemoryPointer 2017-07-11 10:32:01 +02:00
Ralf Jung
30f92f8a27 catch overflows that are hidden by first casting the RHS to u32 2017-07-03 20:50:19 -07:00
Ralf Jung
f118ff43e7 implement the unchecked_ intrinsics; add all the doctests from one of the integer modules 2017-07-03 20:37:33 -07:00
Oliver Schneider
c8079c652c
Address comments 2017-06-28 10:17:14 +02:00
Oliver Schneider
ab400f3eea Initial work towards checking const eval rules in miri 2017-06-26 17:58:47 +02:00
Oliver Schneider
eca9e3429a PrimVal used to allow comparing Undef 2017-06-23 16:12:03 +02:00
Ralf Jung
d5c031640f use PrimVal::to_bool rather than bytes_to_bool 2017-06-22 20:20:26 -07:00
Ralf Jung
14cb31fb88 permit bit-anding in pointer values below the alignment
This makes HashMap work!
2017-06-22 14:46:53 -07:00
Ralf Jung
894306e47d refactor pointer arithmetic handling 2017-06-21 22:59:47 -07:00
Ralf Jung
7b1582b383 permit integer addition and subtraction on ptr-integers 2017-06-21 21:38:43 -07:00
Ralf Jung
b8c5e7fd0e refactor pointer handling in binops 2017-06-21 21:02:11 -07:00
Oliver Schneider
fcf495821e
Get rid of the integer allocation 2017-06-20 14:28:18 +02:00
Ralf Jung
91b93bc701 less strict kind test for pointer operations 2017-06-05 18:23:25 -07:00
Ralf Jung
36505c7b40 fix bitops being accidentally allowed on pointers from the same allocation 2017-06-05 17:17:16 -07:00
Ralf Jung
1b5f77e4c1 Implement Offset like the other binary operators, share code with the intrinsic
Also improve drop glue tests
2017-06-05 14:19:10 -07:00
Oliver Schneider
257ac5803f Don't unconditionally mask bitshift rhs 2017-03-14 14:24:16 +01:00
Oliver Schneider
6aed897c70
1 > -1 2017-02-09 09:43:45 +01:00
Oliver Schneider
3c560f5941 fix some leftover u128 errors 2017-02-07 17:52:32 +01:00
Scott Olson
7acbf7ef74 Cleanup: EvalResult<'a, ()> becomes EvalResult<'a>. 2017-02-04 13:09:10 -08:00
Oliver Schneider
3a658e09e8
rustup (i128) 2017-01-12 08:28:42 +01:00
Scott Olson
6b7c68bec2 Rename bits to bytes for consistency. 2016-12-17 03:19:32 -08:00
Scott Olson
4fe41ad8d5 Refactor PrimVal::bits() out of existence. 2016-12-17 03:09:57 -08:00
Scott Olson
f83c45e367 Turn invalid panics into Results and rename fns. 2016-12-16 22:08:40 -08:00
Scott Olson
b36a83171b Turn PrimVal into an enum including Undefined.
This is step 1 of a refactoring to fix #95. The `Undefined` variant is
so far unused and the old `bits` and `relocation` fields are emulated
with two new temporary methods. There should be no functional change due
to this commit.
2016-12-16 22:03:34 -08:00
Scott Olson
ee0dc452aa Move binop functions to operator module. 2016-12-10 17:03:12 -08:00
Scott Olson
1af63171f8 Split primval into operator and value. 2016-12-10 16:23:07 -08:00