about summary refs log tree commit diff
path: root/src/tools/miri
AgeCommit message (Collapse)AuthorLines
2023-08-08Merge from rustcThe Miri Conjob Bot-5/+5
2023-08-08Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-08-07[perf] Reserve capacity for argvs.Taras Tsugrii-1/+1
This avoids unnecessary allocations to grow vector to sufficient size.
2023-08-07Rollup merge of #114570 - ttsugriy:miri-vc-typo, r=RalfJungMatthias Krüger-1/+1
[miri][typo] Fix a typo in a vector_block comment.
2023-08-07Auto merge of #114560 - RalfJung:miri, r=RalfJungbors-778/+1645
update Miri
2023-08-06[miri][typo] Fix a typo in a vector_block comment.Taras Tsugrii-1/+1
2023-08-06Add a new `compare_bytes` intrinsic instead of calling `memcmp` directlyScott McMurray-4/+4
2023-08-06Auto merge of #3016 - RalfJung:is_reserved, r=RalfJungbors-2/+2
fix typo: is_reserved
2023-08-06fix typo: is_reservedRalf Jung-2/+2
2023-08-06rustc-pull: put a newline after the commit IDRalf Jung-1/+1
2023-08-05add a test ensuring that we enforce noalias on accessesRalf Jung-7/+37
2023-08-05tree borrows: consider some retags as writes for the purpose of data racesRalf Jung-138/+186
2023-08-05ensure we allow zero-sized references to functions and vtablesRalf Jung-0/+32
2023-08-05borrow tracking: simplify provenance updatingRalf Jung-55/+20
2023-08-05fix return place protection when the place is given as a localRalf Jung-1/+71
2023-08-05fmtRalf Jung-10/+2
2023-08-05Merge from rustcRalf Jung-6/+4
2023-08-05Preparing for merge from rustcRalf Jung-1/+1
2023-08-04interpret: add mplace_to_ref helper methodRalf Jung-6/+4
2023-08-04Auto merge of #3011 - saethlin:spellck, r=RalfJungbors-7/+7
A bit of spell-checking I noticed the one error in miri-script and took care of a few more shallow ones.
2023-08-04Merge from rustcThe Miri Conjob Bot-5/+8
2023-08-04Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-08-03Auto merge of #108955 - Nilstrieb:dont-use-me-pls, r=oli-obkbors-0/+1
Add `internal_features` lint Implements https://github.com/rust-lang/compiler-team/issues/596 Also requires some more test blessing for codegen tests etc `@jyn514` had the idea of just `allow`ing the lint by default in the test suite. I'm not sure whether this is a good idea, but it's definitely one worth considering. Additional input encouraged.
2023-08-03A bit of spell-checkingBen Kimock-7/+7
2023-08-03Add `internal_features` lintNilstrieb-0/+1
It lints against features that are inteded to be internal to the compiler and standard library. Implements MCP #596. We allow `internal_features` in the standard library and compiler as those use many features and this _is_ the standard library from the "internal to the compiler and standard library" after all. Marking some features as internal wasn't exactly the most scientific approach, I just marked some mostly obvious features. While there is a categorization in the macro, it's not very well upheld (should probably be fixed in another PR). We always pass `-Ainternal_features` in the testsuite About 400 UI tests and several other tests use internal features. Instead of throwing the attribute on each one, just always allow them. There's nothing wrong with testing internal features^^
2023-08-03Auto merge of #3009 - oli-obk:auto_actions, r=oli-obkbors-9/+16
Avoid infinite recursion for auto-fmt and auto-clippy I got stack overflows after I fixed the `-`/`_` typo 😆
2023-08-03add test checking that overlapping assignments workRalf Jung-0/+9
2023-08-03Avoid infinite recursion for auto-fmt and auto-clippyOli Scherer-9/+16
2023-08-03fmtThe Miri Conjob Bot-2/+7
2023-08-03Merge from rustcThe Miri Conjob Bot-175/+179
2023-08-03Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-08-02cargo-miri: avoid set_envRalf Jung-7/+18
2023-08-02Command debug printing prints the environment these days, we can kill some ↵Ralf Jung-39/+1
custom debugging code
2023-08-02fix miri-script being silent when running './miri test'Ralf Jung-8/+14
2023-08-02no need to forward all env varsRalf Jung-17/+8
2023-08-02Auto merge of #3004 - RalfJung:borrow-tests, r=RalfJungbors-11/+77
add some SB and TB tests Also I realized the `direct_mut_to_const_raw` test can be enabled in TB, so let's do that.
2023-08-02const validation: point at where we found a pointer but expected an integerRalf Jung-5/+7
2023-08-02add local_addr_of_mut testRalf Jung-0/+12
2023-08-02miri-script: simplify flag computation a bitRalf Jung-12/+12
2023-08-02add write_does_not_invalidate_all_aliases test, and enable ↵Ralf Jung-11/+65
direct_mut_to_const_raw test in TB
2023-08-02Auto merge of #112431 - Urgau:cast_ref_to_mut_improvments, r=Nilstriebbors-0/+4
Improve `invalid_reference_casting` lint This PR is a follow-up to https://github.com/rust-lang/rust/pull/111567 and https://github.com/rust-lang/rust/pull/113422. This PR does multiple things: - First it adds support for deferred de-reference, the goal is to support code like this, where the casting and de-reference are not done on the same expression ```rust let myself = self as *const Self as *mut Self; *myself = Self::Ready(value); ``` - Second it does not lint anymore on SB/TB UB code by only checking assignments (`=`, `+=`, ...) and creation of mutable references `&mut *` - Thirdly it greatly improves the diagnostics in particular for cast from `&mut` to `&mut` or assignments - ~~And lastly it renames the lint from `cast_ref_to_mut` to `invalid_reference_casting` which is more consistent with the ["rules"](https://github.com/rust-lang/rust-clippy/issues/2845) and also more consistent with what the lint checks~~ *https://github.com/rust-lang/rust/pull/113422* This PR is best reviewed commit by commit. r? compiler
2023-08-02Auto merge of #114333 - RalfJung:dangling-ptr-offset, r=oli-obkbors-175/+175
Miri: fix error on dangling pointer inbounds offset We used to claim that the pointer was "dereferenced", but that is just not true. Can be reviewed commit-by-commit. The first commit is an unrelated rename that didn't seem worth splitting into its own PR. r? `@oli-obk`
2023-08-02fmtThe Miri Conjob Bot-8/+12
2023-08-02Merge from rustcThe Miri Conjob Bot-50/+123
2023-08-02Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2023-08-01Auto merge of #114331 - matthiaskrgr:rollup-rnrmwcx, r=matthiaskrgrbors-0/+24
Rollup of 7 pull requests Successful merges: - #100455 (Implement RefUnwindSafe for Backtrace) - #113428 (coverage: Replace `ExpressionOperandId` with enum `Operand`) - #114283 (Use parking lot's rwlock even without parallel-rustc) - #114288 (Improve diagnostic for wrong borrow on binary operations) - #114296 (interpret: fix alignment handling for Repeat expressions) - #114306 ([rustc_data_structures][perf] Simplify base_n::push_str.) - #114320 (Cover statements for stable_mir) r? `@ghost` `@rustbot` modify labels: rollup
2023-08-01properly track why we checked whether a pointer is in-boundsRalf Jung-102/+102
also simplify the in-bounds checking in Miri's borrow trackers
2023-08-01Rollup merge of #114296 - RalfJung:interpret-repeat-align, r=oli-obkMatthias Krüger-0/+24
interpret: fix alignment handling for Repeat expressions
2023-08-01Auto merge of #112849 - m-ou-se:panic-message-format, r=thomccbors-49/+98
Change default panic handler message format. This changes the default panic hook's message format from: ``` thread '{thread}' panicked at '{message}', {location} ``` to ``` thread '{thread}' panicked at {location}: {message} ``` This puts the message on its own line without surrounding quotes, making it easiser to read. For example: Before: ``` thread 'main' panicked at 'env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh`', src/main.rs:4:6 ``` After: ``` thread 'main' panicked at src/main.rs:4:6: env variable `IMPORTANT_PATH` should be set by `wrapper_script.sh` ``` --- See this PR by `@nyurik,` which does that for only multi-line messages (specifically because of `assert_eq`): https://github.com/rust-lang/rust/pull/111071 This is the change that does that for *all* panic messages.
2023-08-01rename deref_operand → deref_pointer and some Miri helper functionsRalf Jung-73/+73