Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge miri into librustc_mir #43340

Closed
wants to merge 1,273 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1273 commits
Select commit Hold shift + click to select a range
671ccca
Update to rustc 1.19.0-nightly (777ee2079 2017-05-01)
oli-obk May 2, 2017
f8c8813
Merge pull request #162 from solson/rustup
eddyb May 2, 2017
07229d6
Rustup to rustc 1.19.0-nightly (2d4ed8e0c 2017-05-03)
oli-obk May 4, 2017
da3860a
Address things complained about by clippy
oli-obk May 5, 2017
5f67ba7
Removed unused crate imports
oli-obk May 5, 2017
1f8aa8d
Merge pull request #163 from solson/rustup
eddyb May 5, 2017
23cf495
Update Cargo.toml, fix for build error (see #164)
Sharazam May 9, 2017
25185fd
Merge pull request #165 from sharazam/patch-1
oli-obk May 9, 2017
9e44509
Update dependencies
oli-obk May 9, 2017
ecf452c
don't match on floating-point literal
May 10, 2017
2b84e17
update for new boxier mir
May 13, 2017
8950b12
Merge pull request #167 from dwrensha/update-rustc
eddyb May 13, 2017
0641e93
implement __rust_allocate_zeroed C ABI function
May 21, 2017
5483806
Merge pull request #168 from dwrensha/allocate-zeroed
eddyb May 21, 2017
7817092
fix 'cargo run' in README
RalfJung May 23, 2017
5accdf4
use `cargo +nightly` rather than `rustup run nightly cargo`
RalfJung May 23, 2017
48662d5
update for upstream changes with ty::ParamEnv
May 24, 2017
e2a0998
Merge pull request #170 from dwrensha/rustup
oli-obk May 24, 2017
bea6d83
Merge pull request #169 from RalfJung/cargo-run
oli-obk May 24, 2017
c384f95
Rvalue::Box -> Rvalue::NullaryOp
May 30, 2017
6649522
closure_to_fn_coercion has been stabilized
May 30, 2017
53412ab
Merge pull request #172 from dwrensha/rustup
oli-obk May 30, 2017
ab90500
Make println!("String") work
RalfJung May 24, 2017
1ae01b4
add instructions for how to compile libstd with xargo
RalfJung May 24, 2017
33d42f4
also support writing to stderr
RalfJung May 25, 2017
452cc9b
handle statics with linkage: initialize them with NULL
RalfJung May 25, 2017
238211e
implement TLS
RalfJung May 25, 2017
a66f359
support TLS destructors
RalfJung May 26, 2017
14b16dc
use proper span for TLS dtors; fix some nits
RalfJung May 26, 2017
55438fe
unify the way we intercept missing MIR and C ABI calls; only intercep…
RalfJung May 26, 2017
720c5f8
implement __rust_maybe_catch_panic
RalfJung May 27, 2017
cd6e3e6
If a "start" lang item incl. MIR is present, run that instead of runn…
RalfJung May 27, 2017
99433a1
improve fn pointer signature check to allow some casts that should be…
RalfJung May 27, 2017
1241938
test suite now also passes on MIR-libstd
RalfJung May 27, 2017
633a34d
re-disable aux_test -- it passes here, but not on Travis
RalfJung May 27, 2017
24a9a14
fix various small nits
RalfJung May 30, 2017
dad9547
test thread-local key with no dtor
RalfJung May 30, 2017
cdf7a05
latest rust nightly contains all the bits needed to re-compile libstd
RalfJung May 30, 2017
b8e0b79
add a test for output string formatting
RalfJung May 30, 2017
b44babf
allocate return pointer only when we start the program via the start …
RalfJung May 30, 2017
2b37d50
simplify determining size and alignment of a pointer
RalfJung May 31, 2017
d06c165
simplify xargo instructions
RalfJung May 31, 2017
c817e6e
Merge pull request #171 from RalfJung/println
oli-obk May 31, 2017
fbc4627
prevent 'attempt to shift left with overflow' panic on platforms wher…
May 31, 2017
7624bca
ignore thread-local-no-dtor test on windows-gnu target
May 31, 2017
f85c7a2
Merge pull request #173 from dwrensha/fix-tls-test
eddyb May 31, 2017
6619ed8
bin/miri.rs looks for RUST_SYSROOT, so should bin/cargo-miri.rs
RalfJung May 30, 2017
a59d482
remove unneeded '-gnu' suffix from compiletest ignore directives
May 31, 2017
1ba426a
Merge pull request #175 from dwrensha/ignore-windows
eddyb May 31, 2017
44a45f7
run test suite also against libstd with full MIR
RalfJung May 30, 2017
b946351
Merge pull request #174 from RalfJung/xargo-test
oli-obk May 31, 2017
e6eaf20
interpret StorageLive & StorageDead, and check dead stack slots are n…
RalfJung Jun 1, 2017
db6ce46
fix some nits
RalfJung Jun 1, 2017
dd7735b
make StorageLive kill the current value of the local
RalfJung Jun 2, 2017
ec7f1d5
Fix typo
oli-obk Jun 2, 2017
d7d11c1
Merge pull request #176 from RalfJung/storage
oli-obk Jun 2, 2017
ca8347a
update for upstream ParamEnv changes
Jun 3, 2017
14848b3
Merge pull request #179 from dwrensha/rustup
eddyb Jun 3, 2017
31cf66d
remove our array drop glue and use rustc's instead; implement the new…
RalfJung Jun 2, 2017
1b5f77e
Implement Offset like the other binary operators, share code with the…
RalfJung Jun 5, 2017
716653f
add comments in the tests explaining what the ignore flags do
RalfJung Jun 3, 2017
cfff91b
write_bytes intrinsic: if the write count is 0, the pointer does not …
RalfJung Jun 3, 2017
6197f4f
Permit int->ptr->int roundtrip
RalfJung Jun 4, 2017
1d0e622
test that we cannot observe the bytes representing a pointer
RalfJung Jun 4, 2017
70227c8
fix arith_offset not taking the size of the type into account; test f…
RalfJung Jun 5, 2017
f39e015
check for overflow when doing pointer arithmetic
RalfJung Jun 5, 2017
2a231d6
check bounds when using offset intrinsic or MIR op
RalfJung Jun 5, 2017
c16f24b
Merge pull request #177 from RalfJung/drop-glue
oli-obk Jun 5, 2017
a291153
Permit ptr->int->ptr roundtrip
RalfJung Jun 5, 2017
a6e6a6f
Add some more tests involving Offset/arith_offset and ZST pointers
RalfJung Jun 5, 2017
36505c7
fix bitops being accidentally allowed on pointers from the same alloc…
RalfJung Jun 6, 2017
7bfda59
don't bother inserting integer relocations into the relocation table
RalfJung Jun 6, 2017
684de68
properly wrap pointer offsets at pointer size
RalfJung Jun 6, 2017
91b93bc
less strict kind test for pointer operations
RalfJung Jun 6, 2017
58a4639
Merge pull request #185 from RalfJung/pointers
oli-obk Jun 6, 2017
c8be312
fix issue 184 by marking the destination as a packed struct
Jun 6, 2017
49fb43f
use type_align() and type_size() instaed of size_and_align_of_dst()
Jun 6, 2017
cad0188
Merge pull request #187 from dwrensha/fix-issue-184-mark-packed
oli-obk Jun 6, 2017
e1562fb
comments
RalfJung Jun 6, 2017
3e1596d
Error out when "primitive MIR math" (as opposed to unchecked intrinsi…
RalfJung Jun 7, 2017
e0559a6
typos
RalfJung Jun 8, 2017
3a5abf0
fix comment in aux_test
RalfJung Jun 8, 2017
2daf62f
Merge pull request #188 from RalfJung/overflow
oli-obk Jun 8, 2017
f174cc8
tcx.infer_ctxt() no longer takes an argument
Jun 11, 2017
cb10f2f
Merge pull request #192 from dwrensha/rustup
eddyb Jun 11, 2017
7504512
rustup 1.4 fixed the permissions of the extracted files
RalfJung Jun 12, 2017
4ac9fa6
enable a test that was accidentally left disabled
RalfJung Jun 12, 2017
7b9abf7
Merge pull request #193 from RalfJung/xargo
oli-obk Jun 12, 2017
ec8cd6d
Merge pull request #194 from RalfJung/test
oli-obk Jun 12, 2017
03577a9
Fix some clippy warnings
oli-obk Jun 12, 2017
4b1a12c
test the Rc::{into,from}_raw roundtrip
RalfJung Jun 12, 2017
4566058
Merge pull request #195 from RalfJung/test
eddyb Jun 13, 2017
a28c799
update compiletest and remove obsolete comment
Jun 19, 2017
fb3d93c
Merge pull request #198 from dwrensha/update-compiletest
oli-obk Jun 20, 2017
f14ebd1
handle EndRegion as no-op
Jun 20, 2017
2302f2b
Merge pull request #199 from dwrensha/end-region
oli-obk Jun 20, 2017
f5ca91e
Update to latest nightly
oli-obk Jun 20, 2017
fcf4958
Get rid of the integer allocation
oli-obk Jun 19, 2017
43afa20
Add pthread docs
oli-obk Jun 19, 2017
a2baeb5
Run the tls destructors in the correct order
oli-obk Jun 19, 2017
75fddee
Simplify the return lvalue
oli-obk Jun 19, 2017
a6734cd
Fix unions
oli-obk Jun 19, 2017
ea6f607
Use PrimVal instead of Pointer where applicable
oli-obk Jun 20, 2017
a82fe9a
Enable more zst writes and reads
oli-obk Jun 20, 2017
ef29e6a
Add fullmir tests
oli-obk Jun 21, 2017
b001b55
The latest nightly doesn't expose as much MIR anymore as it used to
oli-obk Jun 21, 2017
a6cd7a2
Also move some compile-fail tests to fullmir-only
oli-obk Jun 21, 2017
5414825
Simplify numeric intrinsics
oli-obk Jun 21, 2017
f22c7e4
Store env vars where necessary
oli-obk Jun 21, 2017
ecc44fe
Implement `malloc` and `free`
oli-obk Jun 21, 2017
d539faf
Merge pull request #200 from oli-obk/master
oli-obk Jun 21, 2017
a630677
Report better errors on random numbers and threads
oli-obk Jun 21, 2017
8101592
run fullmir tests against rustc; add output explaining what is being …
RalfJung Jun 21, 2017
184d3b3
expand thread-local storage tests to cover dtor order and re-running …
RalfJung Jun 22, 2017
b8c5e7f
refactor pointer handling in binops
RalfJung Jun 22, 2017
7b1582b
permit integer addition and subtraction on ptr-integers
RalfJung Jun 22, 2017
78aa93f
correctly reject functions pointers that had arithmetic done to them
RalfJung Jun 22, 2017
6eafb10
add test for function pointer offsets
RalfJung Jun 22, 2017
894306e
refactor pointer arithmetic handling
RalfJung Jun 22, 2017
7b2b0dd
test HashMap creation in libstd-MIR, and make it work again
RalfJung Jun 22, 2017
a805606
malloc should return null for zst allocs
oli-obk Jun 22, 2017
6034655
Merge pull request #205 from RalfJung/tests
oli-obk Jun 22, 2017
86d31fa
update xargo usage example for new location of vecs.rs
Jun 22, 2017
046136a
Merge pull request #207 from dwrensha/update-readme
eddyb Jun 22, 2017
522ac49
Merge pull request #206 from RalfJung/ptrs
oli-obk Jun 22, 2017
8733bd0
Update mod.rs
oli-obk Jun 22, 2017
1883aac
Update foreign-fn-linkname.rs
oli-obk Jun 22, 2017
2b9cfb6
Update regions-mock-trans.rs
oli-obk Jun 22, 2017
8de1110
Merge pull request #201 from oli-obk/test_suite_fails
oli-obk Jun 22, 2017
3637aa8
allow any offset on integer pointers
RalfJung Jun 21, 2017
6512fa7
use PrimVal::is_null
RalfJung Jun 22, 2017
57391ba
fix unused variable warning
RalfJung Jun 22, 2017
2f61356
permit offsetting a NULL-ptr by 0, to fix hashmap test
RalfJung Jun 22, 2017
c1a6df9
permit all kinds of 0-offsets on ZSTs
RalfJung Jun 22, 2017
1a1d741
Merge pull request #203 from RalfJung/offset
oli-obk Jun 22, 2017
269667e
implement _nonzero intrinsics
RalfJung Jun 22, 2017
14cb31f
permit bit-anding in pointer values below the alignment
RalfJung Jun 22, 2017
12935b6
add some compile-fail tests
RalfJung Jun 22, 2017
d5c0316
use PrimVal::to_bool rather than bytes_to_bool
RalfJung Jun 23, 2017
f10dd41
Merge pull request #209 from RalfJung/ptrs
oli-obk Jun 23, 2017
9be3e91
Remove the zst allocation
oli-obk Jun 23, 2017
c4fc6c6
Typo
oli-obk Jun 23, 2017
5ee4fdc
fetch_tls_dtor "read" an `Undef` as nonzero
oli-obk Jun 23, 2017
eca9e34
PrimVal used to allow comparing `Undef`
oli-obk Jun 23, 2017
377fcce
Ensure tests run with and without full MIR
oli-obk Jun 23, 2017
8c6c6d7
Merge pull request #212 from oli-obk/zero_sense_types
oli-obk Jun 23, 2017
4aca1d0
Make zst compile-fail tests more readable
oli-obk Jun 24, 2017
86e2367
Merge pull request #215 from oli-obk/master
eddyb Jun 24, 2017
7b7f690
Make sure that casting a ptr-integer down to u8 makes it unusable
RalfJung Jun 23, 2017
f0c8df2
handle ptr-int casts explicitly in cast.rs
RalfJung Jun 23, 2017
b1acc13
check alignment of pointers on Ref
RalfJung Jun 23, 2017
fbc00dd
make sure that 'identity casting' works
RalfJung Jun 23, 2017
38d0339
Clarify pattern matching
RalfJung Jun 23, 2017
4e90e3b
remove redundant test
RalfJung Jun 23, 2017
76a1d66
fix build after rebase
RalfJung Jun 24, 2017
14d1309
Merge pull request #210 from RalfJung/ptrcast
oli-obk Jun 24, 2017
ab400f3
Initial work towards checking const eval rules in miri
oli-obk Jun 26, 2017
f3832c6
Merge pull request #218 from oli-obk/minimal_ctfe
oli-obk Jun 27, 2017
5dfaacf
Simplify all the code
oli-obk Jun 27, 2017
5482110
update tests for new error message
Jun 28, 2017
6edca30
Merge pull request #221 from dwrensha/rustup
oli-obk Jun 28, 2017
a724a39
Reword comments
oli-obk Jun 28, 2017
42d3eda
Merge pull request #220 from oli-obk/undo_single_field_opt
oli-obk Jun 28, 2017
c8079c6
Address comments
oli-obk Jun 28, 2017
91409f1
Code nits
oli-obk Jun 28, 2017
917c89e
Optimize lvalue reads from Value::ByVal and Value::ByValPair
oli-obk Jun 28, 2017
51b4321
cast -> transmute
RalfJung Jun 28, 2017
a589ccb
Merge pull request #225 from RalfJung/comments
oli-obk Jun 28, 2017
695f972
Merge pull request #222 from oli-obk/const_eval_checks
oli-obk Jun 28, 2017
32e7dcb
update for upstream changes to TyFnDef
Jun 29, 2017
73ab5c7
normalize signature before passing to check_sig_compat
Jun 29, 2017
4a56083
Merge pull request #226 from dwrensha/rustup
oli-obk Jun 29, 2017
8722ce8
Merge pull request #223 from oli-obk/lvalue_read
oli-obk Jun 29, 2017
e3fa4fb
get cargo-miri to work
Jun 29, 2017
7a755ce
add a dependency to cargo-miri-test
Jun 29, 2017
4fa71ad
Merge pull request #230 from dwrensha/cargo-miri
oli-obk Jun 29, 2017
7008646
update compiletest dependency
Jun 30, 2017
8ff5d59
Merge pull request #231 from dwrensha/update-compiletest
oli-obk Jul 1, 2017
823b952
Only check pointers when dereferencing
oli-obk Jul 3, 2017
0301667
Fix transmute on ByValPair
RalfJung Jul 3, 2017
dc9f5a2
properly check for: double-free, use-after-reallocate
RalfJung Jul 3, 2017
bdcdb60
fix test on i686
RalfJung Jul 3, 2017
440c477
validate size and alignment on reallocate and deallocate
RalfJung Jul 3, 2017
79ab4f0
make u128 test work (commenting out the use of checked_shl)
RalfJung Jul 4, 2017
f118ff4
implement the unchecked_ intrinsics; add all the doctests from one of…
RalfJung Jul 4, 2017
ffd482e
check the assumptions made by the unchecked_ and copy_nonoverlapping …
RalfJung Jul 4, 2017
30f92f8
catch overflows that are hidden by first casting the RHS to u32
RalfJung Jul 4, 2017
19d6ad7
add test for div-by-zero with the operator (rather than the intrinsic)
RalfJung Jul 4, 2017
fa05ca9
Merge pull request #233 from RalfJung/transmute
oli-obk Jul 4, 2017
10ec543
Merge pull request #235 from RalfJung/intrinsics
oli-obk Jul 4, 2017
9a04be9
Merge pull request #232 from oli-obk/master
oli-obk Jul 4, 2017
4165051
refine comment explaining the order of checks on deallocate
RalfJung Jul 5, 2017
b8bd42e
Merge pull request #234 from RalfJung/reallocate
oli-obk Jul 5, 2017
3c0a6d6
simplify reallocate
RalfJung Jul 10, 2017
e60f11f
update for latest nightly
RalfJung Jul 10, 2017
d2cf3d7
update for allocator API
RalfJung Jul 10, 2017
ea730ab
update tests for new allocator API
RalfJung Jul 10, 2017
1cbf5e8
leave notes regarding possible alignment checks
RalfJung Jul 11, 2017
1511023
Merge pull request #237 from RalfJung/reallocate
oli-obk Jul 11, 2017
2d52054
Rename Pointer to MemoryPointer
oli-obk Jul 4, 2017
a8b957a
Add a dedicated `write_null` method
oli-obk Jul 4, 2017
03f0a88
Use a wrapper type to differentiate between PrimVal and pointers
oli-obk Jul 4, 2017
d0d1d2d
Remove `*offset*` methods from `PrimVal` onto `Pointer`
oli-obk Jul 4, 2017
0dd6ef8
Simplify `with_extra`
oli-obk Jul 11, 2017
eba199a
Document the reason for `Pointer`'s existence
oli-obk Jul 11, 2017
40755ec
Merge pull request #236 from oli-obk/pointers
oli-obk Jul 11, 2017
9a9666e
Add a test for using a too big alignment on reallocate
RalfJung Jul 11, 2017
3e7f69a
add little script to build libstd
RalfJung Jul 11, 2017
eafe659
hooking mmap is no longer needed
RalfJung Jul 12, 2017
ea2b192
Merge pull request #239 from RalfJung/mmap
eddyb Jul 12, 2017
28969f4
Merge pull request #238 from RalfJung/tests
oli-obk Jul 12, 2017
4a03e45
Add tests for #113
oli-obk Jul 12, 2017
4ce8be9
Produce `ConstInt` from a `def_id` for rustc
oli-obk Jul 4, 2017
e362c30
Merge pull request #242 from solson/various
oli-obk Jul 12, 2017
fda18f6
Merge pull request #241 from solson/rustc_integration
oli-obk Jul 12, 2017
c149c3f
Re-do packed memory accesses
RalfJung Jul 13, 2017
454fc85
Rename value accessors to "into_*" so the three of them are better al…
RalfJung Jul 13, 2017
1fe310c
Memory::read_ptr has to check for relocations on the edges
RalfJung Jul 13, 2017
287b6be
track alignment also for ByRef values
RalfJung Jul 13, 2017
81307d7
fix "unaligned" transmute
RalfJung Jul 13, 2017
14c8fe7
Merge pull request #248 from RalfJung/pointer-games
oli-obk Jul 13, 2017
fdef27a
Copy `path_to_def` from clippy
oli-obk Jun 28, 2017
f78d6a0
Don't use magic numbers for synconf names
oli-obk Jul 12, 2017
f8757aa
Reuse the `const_eval` method for syscall name resolution
oli-obk Jul 13, 2017
6c9fdc7
expand comment
RalfJung Jul 13, 2017
6fb6a1c
make all Value::into_* methods handle alignment the same way
RalfJung Jul 13, 2017
62334ac
show alignedness of ByRefs; allow converting unaligned ByRef to ptr
RalfJung Jul 13, 2017
d02e7f0
simplify
RalfJung Jul 13, 2017
da5538f
use closures to ensure proper bracketing of unaligned accesses
RalfJung Jul 13, 2017
555fc41
Merge pull request #243 from solson/magic_numbers
oli-obk Jul 13, 2017
0fbbcae
packed structs: test unsize coercions
RalfJung Jul 13, 2017
56d4de3
Merge pull request #247 from RalfJung/packed
oli-obk Jul 14, 2017
192da88
Ensure that it is not possible to explicitly free stack memory
oli-obk Jul 12, 2017
70a914c
Clarify documentation
oli-obk Jul 13, 2017
eb01c3f
Use enum instead of boolean
oli-obk Jul 13, 2017
7701ff2
Remove duplicate test
oli-obk Jul 13, 2017
2e562a4
Fix static mutation tests
oli-obk Jul 13, 2017
45ab975
Add a comment explaining the static "local" during `deallocate_local`
oli-obk Jul 14, 2017
2312ac8
lvalue: refactoring to permit applying a mir projection to a miri lvalue
RalfJung Jun 20, 2017
a29ba6a
Merge pull request #249 from RalfJung/lvalue
oli-obk Jul 14, 2017
5328c5d
Merge pull request #245 from oli-obk/funky_allocs
oli-obk Jul 18, 2017
ff9192e
remove reundant dangling checks in {r,d}eallocate
RalfJung Jul 18, 2017
9bccfd3
use libstd methods for floating-point <-> bytes conversion
RalfJung Jul 18, 2017
824438b
Merge pull request #255 from RalfJung/float
solson Jul 18, 2017
2d5c419
Merge pull request #254 from RalfJung/dangling
oli-obk Jul 18, 2017
d9d792b
Export types and functions needed by priroda
oli-obk Jul 19, 2017
27c6447
Merge pull request #257 from oli-obk/cleanups
oli-obk Jul 19, 2017
57f9b2f
Prepare miri for merging it into rustc
oli-obk Jul 19, 2017
17532bb
Merge miri repository into rustc repository
oli-obk Jul 19, 2017
029802a
Build miri along with the compiler
oli-obk Jul 19, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/librustc_mir/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ rustc_data_structures = { path = "../librustc_data_structures" }
rustc_bitflags = { path = "../librustc_bitflags" }
syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
byteorder = { version = "1.1", features = ["i128"]}
log_settings = "0.1.1"
5 changes: 5 additions & 0 deletions src/librustc_mir/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Rust MIR: a lowered representation of Rust. Also: an experiment!
#![cfg_attr(stage0, feature(associated_consts))]

#[macro_use] extern crate log;
extern crate log_settings;
extern crate graphviz as dot;
#[macro_use]
extern crate rustc;
Expand All @@ -44,6 +45,9 @@ extern crate rustc_const_math;
extern crate rustc_const_eval;
extern crate core; // for NonZero

extern crate byteorder;


pub mod diagnostics;

mod build;
Expand All @@ -52,6 +56,7 @@ mod hair;
mod shim;
pub mod transform;
pub mod util;
pub mod miri;

use rustc::ty::maps::Providers;

Expand Down
201 changes: 201 additions & 0 deletions src/librustc_mir/miri/LICENSE-APACHE
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2016 The Miri Developers

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
25 changes: 25 additions & 0 deletions src/librustc_mir/miri/LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Copyright (c) 2016 The Miri Developers

Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
23 changes: 23 additions & 0 deletions src/librustc_mir/miri/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
An interpreter for [Rust][rust]'s [mid-level intermediate
representation][mir] (MIR).

## Debugging

You can get detailed, statement-by-statement traces by setting the `RUST_LOG`
environment variable to `rustc_mir::miri=trace`. These traces are indented based on call stack
depth. You can get a much less verbose set of information with other logging
levels such as `warn`.

## License

Licensed under either of
* Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or
http://opensource.org/licenses/MIT) at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you shall be dual licensed as above, without any
additional terms or conditions.
Loading