Commit Graph

61 Commits

Author SHA1 Message Date
Alexander Regueiro 12d3ecbaff Various cosmetic improvements. 2019-02-26 18:37:46 +00:00
Ralf Jung 2c3ee678b1 Fix comparing fat pointers 2019-02-15 09:35:55 +01:00
Ralf Jung 457741d6d2 update for new bin_op APIs 2019-02-15 09:35:55 +01:00
Ralf Jung f2e14d9314 use memory::check_bounds_ptr for offset check 2018-12-26 13:16:47 +01:00
Ralf Jung 5a8f9e58f7 properly compare unequal function pointers 2018-12-25 13:29:38 +01:00
Ralf Jung 4e4569cf4b fix build and tests with latest nightly 2018-12-25 13:26:40 +01:00
Oliver Scherer 32e93ed776 Update to Memory -> Allocation method move 2018-11-23 17:00:31 +01:00
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