]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoAlso release locks on ReleaseValidation and EndRegion
Ralf Jung [Thu, 13 Jul 2017 21:05:45 +0000 (14:05 -0700)]
Also release locks on ReleaseValidation and EndRegion

7 years agofix release_lock_until to no longer remove inactive locks
Ralf Jung [Fri, 23 Jun 2017 04:42:46 +0000 (21:42 -0700)]
fix release_lock_until to no longer remove inactive locks

7 years agoavoid downcasting for enum variants without further fields
Ralf Jung [Tue, 20 Jun 2017 06:49:57 +0000 (23:49 -0700)]
avoid downcasting for enum variants without further fields

7 years agovalidate boxes
Ralf Jung [Tue, 20 Jun 2017 06:39:18 +0000 (23:39 -0700)]
validate boxes

7 years agoimplement checking for ADTs
Ralf Jung [Tue, 20 Jun 2017 06:27:25 +0000 (23:27 -0700)]
implement checking for ADTs

7 years agoimplement stub validity check for basic types (bool, int, float); acquire locks for...
Ralf Jung [Tue, 20 Jun 2017 04:18:43 +0000 (21:18 -0700)]
implement stub validity check for basic types (bool, int, float); acquire locks for references

7 years agoimplement acquiring and releasing locks
Ralf Jung [Mon, 19 Jun 2017 21:56:05 +0000 (14:56 -0700)]
implement acquiring and releasing locks

7 years agoadd locking data structures and lock checks
Ralf Jung [Sat, 17 Jun 2017 00:58:18 +0000 (17:58 -0700)]
add locking data structures and lock checks

This brings back some of the memory range ideas that were deleted with the packed refactoring.

7 years agoupdate for rustc changes: treat new MIR commands as NOP
Ralf Jung [Fri, 16 Jun 2017 22:50:59 +0000 (15:50 -0700)]
update for rustc changes: treat new MIR commands as NOP

7 years agoMerge pull request #267 from RalfJung/cast
Oliver Schneider [Mon, 24 Jul 2017 09:31:25 +0000 (11:31 +0200)]
Merge pull request #267 from RalfJung/cast

Fix ptr-int-casts

7 years agoPass `HasDataLayout` instead of the data layout itself
Oliver Schneider [Mon, 24 Jul 2017 07:56:02 +0000 (09:56 +0200)]
Pass `HasDataLayout` instead of the data layout itself

7 years agoUse rustc traits instead of our own
Oliver Schneider [Sun, 23 Jul 2017 13:00:22 +0000 (15:00 +0200)]
Use rustc traits instead of our own

7 years agomove pointer truncation to a common method in memory.rs
Ralf Jung [Sat, 22 Jul 2017 18:28:14 +0000 (11:28 -0700)]
move pointer truncation to a common method in memory.rs

7 years agoMerge pull request #269 from oli-obk/cleanups
Oliver Schneider [Sat, 22 Jul 2017 07:52:47 +0000 (09:52 +0200)]
Merge pull request #269 from oli-obk/cleanups

Remove unused `IntoValTyPair` hack

7 years agofix nits
Ralf Jung [Sat, 22 Jul 2017 03:02:44 +0000 (20:02 -0700)]
fix nits

7 years agorefactor casting code to more clearly handle pointers
Ralf Jung [Thu, 20 Jul 2017 21:03:02 +0000 (14:03 -0700)]
refactor casting code to more clearly handle pointers

7 years agofix casting integers to pointers
Ralf Jung [Thu, 20 Jul 2017 20:52:58 +0000 (13:52 -0700)]
fix casting integers to pointers

7 years agoRemove unused `IntoValTyPair` hack
Oliver Schneider [Fri, 21 Jul 2017 12:59:58 +0000 (14:59 +0200)]
Remove unused `IntoValTyPair` hack

7 years agoMerge pull request #258 from oli-obk/upstream
Oliver Schneider [Fri, 21 Jul 2017 10:32:45 +0000 (12:32 +0200)]
Merge pull request #258 from oli-obk/upstream

Prep miri repository for rustc merger

7 years agoPrep miri repository for rustc merger
Oliver Schneider [Wed, 19 Jul 2017 15:28:46 +0000 (17:28 +0200)]
Prep miri repository for rustc merger

7 years agoMerge pull request #266 from RalfJung/align
Oliver Schneider [Fri, 21 Jul 2017 07:46:50 +0000 (09:46 +0200)]
Merge pull request #266 from RalfJung/align

Always test alignment in memory.rs

7 years agoalways test alignment in memory.rs
Ralf Jung [Thu, 20 Jul 2017 20:20:33 +0000 (13:20 -0700)]
always test alignment in memory.rs

7 years agoMerge pull request #265 from oli-obk/optimize_prime
Oliver Schneider [Thu, 20 Jul 2017 20:08:02 +0000 (22:08 +0200)]
Merge pull request #265 from oli-obk/optimize_prime

Also test optimized MIR

7 years agoAlso test optimized MIR
Oliver Schneider [Thu, 20 Jul 2017 14:05:14 +0000 (16:05 +0200)]
Also test optimized MIR

7 years agoMerge pull request #264 from oli-obk/paths
Oliver Schneider [Thu, 20 Jul 2017 18:00:19 +0000 (20:00 +0200)]
Merge pull request #264 from oli-obk/paths

Reduce the usage of global paths

7 years agoReduce the usage of global paths
Oliver Schneider [Thu, 20 Jul 2017 14:40:57 +0000 (16:40 +0200)]
Reduce the usage of global paths

7 years agoMerge pull request #260 from RalfJung/tests
Oliver Schneider [Thu, 20 Jul 2017 14:07:08 +0000 (16:07 +0200)]
Merge pull request #260 from RalfJung/tests

Split up test suite

7 years agoMerge pull request #262 from RalfJung/never
Eduard-Mihai Burtescu [Thu, 20 Jul 2017 12:13:21 +0000 (15:13 +0300)]
Merge pull request #262 from RalfJung/never

remove ad-hoc 'never' type check in read_lvalue

7 years agoMove rustc tests from tests to a binary, since they are only run manually anyway
Oliver Schneider [Thu, 20 Jul 2017 11:11:40 +0000 (13:11 +0200)]
Move rustc tests from tests to a binary, since they are only run manually anyway

7 years agoMerge pull request #259 from RalfJung/ref-validate
Oliver Schneider [Thu, 20 Jul 2017 05:09:52 +0000 (07:09 +0200)]
Merge pull request #259 from RalfJung/ref-validate

No longer check aligment and non-NULLness on `&`

7 years agoremove ad-hoc 'never' type check in read_lvalue
Ralf Jung [Thu, 20 Jul 2017 03:32:51 +0000 (20:32 -0700)]
remove ad-hoc 'never' type check in read_lvalue

7 years agoadd test for misaligned pointer loads
Ralf Jung [Thu, 20 Jul 2017 03:26:30 +0000 (20:26 -0700)]
add test for misaligned pointer loads

7 years agofix checking alignment of pointer loads
Ralf Jung [Thu, 20 Jul 2017 03:24:09 +0000 (20:24 -0700)]
fix checking alignment of pointer loads

7 years agofix a warning
Ralf Jung [Wed, 19 Jul 2017 20:31:21 +0000 (13:31 -0700)]
fix a warning

7 years agosplit up the test suite
Ralf Jung [Wed, 19 Jul 2017 19:52:20 +0000 (12:52 -0700)]
split up the test suite

7 years agoenable test code that passes just fine
Ralf Jung [Wed, 19 Jul 2017 18:38:15 +0000 (11:38 -0700)]
enable test code that passes just fine

7 years agoDon't pretend that casts to bool are a thing
Ralf Jung [Wed, 19 Jul 2017 18:35:06 +0000 (11:35 -0700)]
Don't pretend that casts to bool are a thing

7 years agoNo longer check aligment and non-NULLness on `&`
Ralf Jung [Wed, 19 Jul 2017 18:28:35 +0000 (11:28 -0700)]
No longer check aligment and non-NULLness on `&`

This breaks creating unaligned raw pointers via `&packed.field as *const _`, which needs to be legal.
Also it doesn't seem like LLVM still relies on this, see
* https://github.com/solson/miri/issues/244#issuecomment-315563640
* https://internals.rust-lang.org/t/rules-for-alignment-and-non-nullness-of-references/5430/16

We probably want to handle this invariant like the others that validation is concerned with, and only
check it on function boundaries for now.

7 years agoMerge pull request #257 from oli-obk/cleanups
Oliver Schneider [Wed, 19 Jul 2017 09:40:43 +0000 (11:40 +0200)]
Merge pull request #257 from oli-obk/cleanups

Export types and functions needed by priroda

7 years agoExport types and functions needed by priroda
Oliver Schneider [Wed, 19 Jul 2017 09:06:07 +0000 (11:06 +0200)]
Export types and functions needed by priroda

7 years agoMerge pull request #254 from RalfJung/dangling
Oliver Schneider [Tue, 18 Jul 2017 21:34:09 +0000 (23:34 +0200)]
Merge pull request #254 from RalfJung/dangling

Remove reundant dangling checks in {r,d}eallocate

7 years agoMerge pull request #255 from RalfJung/float
Scott Olson [Tue, 18 Jul 2017 21:16:42 +0000 (14:16 -0700)]
Merge pull request #255 from RalfJung/float

use libstd methods for floating-point <-> bytes conversion

7 years agouse libstd methods for floating-point <-> bytes conversion
Ralf Jung [Tue, 18 Jul 2017 20:56:01 +0000 (13:56 -0700)]
use libstd methods for floating-point <-> bytes conversion

7 years agoremove reundant dangling checks in {r,d}eallocate
Ralf Jung [Tue, 18 Jul 2017 20:50:54 +0000 (13:50 -0700)]
remove reundant dangling checks in {r,d}eallocate

7 years agoMerge pull request #245 from oli-obk/funky_allocs
Oliver Schneider [Tue, 18 Jul 2017 12:09:15 +0000 (14:09 +0200)]
Merge pull request #245 from oli-obk/funky_allocs

Ensure that it is not possible to explicitly free stack memory

7 years agoMerge pull request #249 from RalfJung/lvalue
Oliver Schneider [Fri, 14 Jul 2017 19:28:06 +0000 (21:28 +0200)]
Merge pull request #249 from RalfJung/lvalue

lvalue: refactoring to permit applying a mir projection to a miri lvalue

7 years agolvalue: refactoring to permit applying a mir projection to a miri lvalue
Ralf Jung [Tue, 20 Jun 2017 03:13:26 +0000 (20:13 -0700)]
lvalue: refactoring to permit applying a mir projection to a miri lvalue

7 years agoAdd a comment explaining the static "local" during `deallocate_local`
Oliver Schneider [Fri, 14 Jul 2017 15:46:28 +0000 (17:46 +0200)]
Add a comment explaining the static "local" during `deallocate_local`

7 years agoFix static mutation tests
Oliver Schneider [Thu, 13 Jul 2017 17:10:14 +0000 (19:10 +0200)]
Fix static mutation tests

7 years agoRemove duplicate test
Oliver Schneider [Thu, 13 Jul 2017 15:25:27 +0000 (17:25 +0200)]
Remove duplicate test

7 years agoUse enum instead of boolean
Oliver Schneider [Thu, 13 Jul 2017 15:25:17 +0000 (17:25 +0200)]
Use enum instead of boolean

7 years agoClarify documentation
Oliver Schneider [Thu, 13 Jul 2017 14:58:36 +0000 (16:58 +0200)]
Clarify documentation

7 years agoEnsure that it is not possible to explicitly free stack memory
Oliver Schneider [Wed, 12 Jul 2017 12:51:47 +0000 (14:51 +0200)]
Ensure that it is not possible to explicitly free stack memory

7 years agoMerge pull request #247 from RalfJung/packed
Oliver Schneider [Fri, 14 Jul 2017 06:30:30 +0000 (08:30 +0200)]
Merge pull request #247 from RalfJung/packed

Re-do packed memory accesses

7 years agopacked structs: test unsize coercions
Ralf Jung [Thu, 13 Jul 2017 21:18:26 +0000 (14:18 -0700)]
packed structs: test unsize coercions

7 years agoMerge pull request #243 from solson/magic_numbers
Oliver Schneider [Thu, 13 Jul 2017 20:07:02 +0000 (22:07 +0200)]
Merge pull request #243 from solson/magic_numbers

Get rid of magic numbers

7 years agouse closures to ensure proper bracketing of unaligned accesses
Ralf Jung [Thu, 13 Jul 2017 17:29:11 +0000 (10:29 -0700)]
use closures to ensure proper bracketing of unaligned accesses

7 years agosimplify
Ralf Jung [Thu, 13 Jul 2017 16:10:50 +0000 (09:10 -0700)]
simplify

7 years agoshow alignedness of ByRefs; allow converting unaligned ByRef to ptr
Ralf Jung [Thu, 13 Jul 2017 16:09:45 +0000 (09:09 -0700)]
show alignedness of ByRefs; allow converting unaligned ByRef to ptr

7 years agomake all Value::into_* methods handle alignment the same way
Ralf Jung [Thu, 13 Jul 2017 16:06:27 +0000 (09:06 -0700)]
make all Value::into_* methods handle alignment the same way

7 years agoexpand comment
Ralf Jung [Thu, 13 Jul 2017 15:40:05 +0000 (08:40 -0700)]
expand comment

7 years agoReuse the `const_eval` method for syscall name resolution
Oliver Schneider [Thu, 13 Jul 2017 14:49:55 +0000 (16:49 +0200)]
Reuse the `const_eval` method for syscall name resolution

7 years agoDon't use magic numbers for synconf names
Oliver Schneider [Wed, 12 Jul 2017 08:36:14 +0000 (10:36 +0200)]
Don't use magic numbers for synconf names

instead read them from the `libc` crate if available.

fixes #216

7 years agoCopy `path_to_def` from clippy
Oliver Schneider [Wed, 28 Jun 2017 11:59:16 +0000 (13:59 +0200)]
Copy `path_to_def` from clippy

7 years agoMerge pull request #248 from RalfJung/pointer-games
Oliver Schneider [Thu, 13 Jul 2017 09:43:25 +0000 (11:43 +0200)]
Merge pull request #248 from RalfJung/pointer-games

Memory::read_ptr has to check for relocations on the edges

7 years agofix "unaligned" transmute
Ralf Jung [Thu, 13 Jul 2017 06:40:31 +0000 (23:40 -0700)]
fix "unaligned" transmute

7 years agotrack alignment also for ByRef values
Ralf Jung [Thu, 13 Jul 2017 04:06:57 +0000 (21:06 -0700)]
track alignment also for ByRef values

7 years agoMemory::read_ptr has to check for relocations on the edges
Ralf Jung [Thu, 13 Jul 2017 02:29:16 +0000 (19:29 -0700)]
Memory::read_ptr has to check for relocations on the edges

7 years agoRename value accessors to "into_*" so the three of them are better aligned
Ralf Jung [Thu, 13 Jul 2017 00:52:57 +0000 (17:52 -0700)]
Rename value accessors to "into_*" so the three of them are better aligned

7 years agoRe-do packed memory accesses
Ralf Jung [Thu, 13 Jul 2017 00:46:56 +0000 (17:46 -0700)]
Re-do packed memory accesses

We now track in the lvalue whether what we computed is expected to be aligend or not, and then set some state in the memory system accordingly to make it (not) do alignment checks

7 years agoMerge pull request #241 from solson/rustc_integration
Oliver Schneider [Wed, 12 Jul 2017 09:02:03 +0000 (11:02 +0200)]
Merge pull request #241 from solson/rustc_integration

Produce `ConstInt` from a `def_id` for rustc

7 years agoMerge pull request #242 from solson/various
Oliver Schneider [Wed, 12 Jul 2017 08:40:02 +0000 (10:40 +0200)]
Merge pull request #242 from solson/various

Add tests for #113

7 years agoProduce `ConstInt` from a `def_id` for rustc
Oliver Schneider [Tue, 4 Jul 2017 15:03:21 +0000 (17:03 +0200)]
Produce `ConstInt` from a `def_id` for rustc

7 years agoAdd tests for #113
Oliver Schneider [Wed, 12 Jul 2017 07:29:18 +0000 (09:29 +0200)]
Add tests for #113

resolves #113

7 years agoMerge pull request #238 from RalfJung/tests
Oliver Schneider [Wed, 12 Jul 2017 07:08:07 +0000 (09:08 +0200)]
Merge pull request #238 from RalfJung/tests

Add little script to build libstd

7 years agoMerge pull request #239 from RalfJung/mmap
Eduard-Mihai Burtescu [Wed, 12 Jul 2017 06:03:22 +0000 (09:03 +0300)]
Merge pull request #239 from RalfJung/mmap

hooking mmap is no longer needed

7 years agohooking mmap is no longer needed
Ralf Jung [Wed, 12 Jul 2017 00:24:15 +0000 (17:24 -0700)]
hooking mmap is no longer needed

7 years agoadd little script to build libstd
Ralf Jung [Tue, 11 Jul 2017 17:25:05 +0000 (10:25 -0700)]
add little script to build libstd

That's easier to use than having to `cd xargo`

7 years agoAdd a test for using a too big alignment on reallocate
Ralf Jung [Tue, 11 Jul 2017 17:24:34 +0000 (10:24 -0700)]
Add a test for using a too big alignment on reallocate

7 years agoMerge pull request #236 from oli-obk/pointers
Oliver Schneider [Tue, 11 Jul 2017 13:03:14 +0000 (15:03 +0200)]
Merge pull request #236 from oli-obk/pointers

Use a wrapper type to differentiate between `PrimVal` and pointers

7 years agoDocument the reason for `Pointer`'s existence
Oliver Schneider [Tue, 11 Jul 2017 10:50:03 +0000 (12:50 +0200)]
Document the reason for `Pointer`'s existence

7 years agoSimplify `with_extra`
Oliver Schneider [Tue, 11 Jul 2017 10:39:12 +0000 (12:39 +0200)]
Simplify `with_extra`

7 years agoRemove `*offset*` methods from `PrimVal` onto `Pointer`
Oliver Schneider [Tue, 4 Jul 2017 12:47:46 +0000 (14:47 +0200)]
Remove `*offset*` methods from `PrimVal` onto `Pointer`

7 years agoUse a wrapper type to differentiate between PrimVal and pointers
Oliver Schneider [Tue, 4 Jul 2017 12:33:15 +0000 (14:33 +0200)]
Use a wrapper type to differentiate between PrimVal and pointers

7 years agoAdd a dedicated `write_null` method
Oliver Schneider [Tue, 4 Jul 2017 12:26:27 +0000 (14:26 +0200)]
Add a dedicated `write_null` method

7 years agoRename Pointer to MemoryPointer
Oliver Schneider [Tue, 4 Jul 2017 11:16:29 +0000 (13:16 +0200)]
Rename Pointer to MemoryPointer

7 years agoMerge pull request #237 from RalfJung/reallocate
Oliver Schneider [Tue, 11 Jul 2017 07:39:52 +0000 (09:39 +0200)]
Merge pull request #237 from RalfJung/reallocate

Update for allcator API, simplify reallocate

7 years agoleave notes regarding possible alignment checks
Ralf Jung [Tue, 11 Jul 2017 01:09:46 +0000 (18:09 -0700)]
leave notes regarding possible alignment checks

7 years agoupdate tests for new allocator API
Ralf Jung [Mon, 10 Jul 2017 22:58:47 +0000 (15:58 -0700)]
update tests for new allocator API

7 years agoupdate for allocator API
Ralf Jung [Mon, 10 Jul 2017 22:46:16 +0000 (15:46 -0700)]
update for allocator API

7 years agoupdate for latest nightly
Ralf Jung [Mon, 10 Jul 2017 20:57:18 +0000 (13:57 -0700)]
update for latest nightly

7 years agosimplify reallocate
Ralf Jung [Mon, 10 Jul 2017 20:34:54 +0000 (13:34 -0700)]
simplify reallocate

7 years agoMerge pull request #234 from RalfJung/reallocate
Oliver Schneider [Wed, 5 Jul 2017 17:54:54 +0000 (19:54 +0200)]
Merge pull request #234 from RalfJung/reallocate

Make Reallocate & Deallocate less permissive

7 years agorefine comment explaining the order of checks on deallocate
Ralf Jung [Wed, 5 Jul 2017 17:26:15 +0000 (10:26 -0700)]
refine comment explaining the order of checks on deallocate

7 years agoMerge pull request #232 from oli-obk/master
Oliver Schneider [Tue, 4 Jul 2017 07:50:54 +0000 (09:50 +0200)]
Merge pull request #232 from oli-obk/master

Only check pointers when dereferencing

7 years agoMerge pull request #235 from RalfJung/intrinsics
Oliver Schneider [Tue, 4 Jul 2017 06:38:22 +0000 (08:38 +0200)]
Merge pull request #235 from RalfJung/intrinsics

Implement some missing intrinsics

7 years agoMerge pull request #233 from RalfJung/transmute
Oliver Schneider [Tue, 4 Jul 2017 06:32:46 +0000 (08:32 +0200)]
Merge pull request #233 from RalfJung/transmute

Fix transmute on ByValPair

7 years agoadd test for div-by-zero with the operator (rather than the intrinsic)
Ralf Jung [Tue, 4 Jul 2017 03:59:47 +0000 (20:59 -0700)]
add test for div-by-zero with the operator (rather than the intrinsic)

7 years agocatch overflows that are hidden by first casting the RHS to u32
Ralf Jung [Tue, 4 Jul 2017 03:46:21 +0000 (20:46 -0700)]
catch overflows that are hidden by first casting the RHS to u32

7 years agocheck the assumptions made by the unchecked_ and copy_nonoverlapping intrinsics
Ralf Jung [Tue, 4 Jul 2017 03:27:09 +0000 (20:27 -0700)]
check the assumptions made by the unchecked_ and copy_nonoverlapping intrinsics