about summary refs log tree commit diff
path: root/src/tools/miri
AgeCommit message (Collapse)AuthorLines
2024-02-11fmtThe Miri Conjob Bot-2/+8
2024-02-11Merge from rustcThe Miri Conjob Bot-3/+3
2024-02-11Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2024-02-11Rollup merge of #120882 - RalfJung:set-discriminant, r=compiler-errorsMatthias Krüger-0/+51
interpret/write_discriminant: when encoding niched variant, ensure the stored value matches Cc https://github.com/rust-lang/unsafe-code-guidelines/issues/487
2024-02-10Factor out the redundancy between `test_mmap` and `test_mmap64`.Dan Gohman-127/+24
2024-02-10validation: descend from consts into staticsRalf Jung-3/+3
2024-02-10interpret/write_discriminant: when encoding niched variant, ensure the ↵Ralf Jung-0/+51
stored value matches
2024-02-10fmtThe Miri Conjob Bot-1/+1
2024-02-10Merge from rustcThe Miri Conjob Bot-3/+7
2024-02-10Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2024-02-09Auto merge of #120676 - Mark-Simulacrum:bootstrap-bump, r=clubby789bors-1/+1
Bump bootstrap compiler to just-built 1.77 beta https://forge.rust-lang.org/release/process.html#master-bootstrap-update-t-2-day-tuesday
2024-02-09Rollup merge of #120693 - nnethercote:invert-diagnostic-lints, r=davidtwcoMatthias Krüger-2/+6
Invert diagnostic lints. That is, change `diagnostic_outside_of_impl` and `untranslatable_diagnostic` from `allow` to `deny`, because more than half of the compiler has been converted to use translated diagnostics. This commit removes more `deny` attributes than it adds `allow` attributes, which proves that this change is warranted. r? ````@davidtwco````
2024-02-08Step all bootstrap cfgs forwardMark Rousskov-1/+1
This also takes care of other bootstrap-related changes.
2024-02-08fmtThe Miri Conjob Bot-3/+2
2024-02-08Merge from rustcThe Miri Conjob Bot-23/+87
2024-02-08Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2024-02-07Update testsr0cky-0/+12
2024-02-06Rollup merge of #120683 - RalfJung:symbolic-alignment-ice, r=oli-obkMatthias Krüger-23/+75
miri: fix ICE with symbolic alignment check on extern static Fixes https://github.com/rust-lang/miri/issues/3288. Also fixes [this example](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=38ee338ff10726be72bdd6efa3386763). This could almost be a Miri PR, except for that typo fix in the validator. I started this as a rustc patch since I thought I need rustc changes, and now it'd be too annoying to turn this into a Miri PR... r? `@oli-obk`
2024-02-06miri: fix ICE with symbolic alignment check on extern staticRalf Jung-23/+75
2024-02-06Merge from rustcThe Miri Conjob Bot-2/+22
2024-02-06Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2024-02-06Invert diagnostic lints.Nicholas Nethercote-2/+6
That is, change `diagnostic_outside_of_impl` and `untranslatable_diagnostic` from `allow` to `deny`, because more than half of the compiler has be converted to use translated diagnostics. This commit removes more `deny` attributes than it adds `allow` attributes, which proves that this change is warranted.
2024-02-05Auto merge of #117372 - Amanieu:stdarch_update, r=Mark-Simulacrumbors-2/+2
Update stdarch submodule Splits up #27731 into multiple tracking issues. Closes #27731
2024-02-04Stop recommending cargo clean in READMETommi Virtanen-5/+2
Miri has used the `target/miri` subdirectory since 2021 to keep itself separate from non-miri builds, so this should not be necessary. See commit 6a18683d09f74ead9438aa7fdd323b18821f7709 Since the items are no longer a sequence of steps to do in order ("first, make sure that ..."), switch to an unordered list while we're at it. Closes #3289
2024-02-03Auto merge of #2956 - oli-obk:atty, r=RalfJungbors-108/+27
Switch over to rustc's `tracing` crate instead of using our own `log` crate disadvantage: to turn on debug/trace logging, you need a rustc built with it advantage: sharing our logging scheme with rustc, so our logs get nested correctly.
2024-02-02miri: normalize struct tail in ABI compat checkLukas Markeffsky-0/+20
2024-01-31Auto merge of #3283 - devnexen:fbsd_affinity, r=oli-obkbors-13/+22
moving out sched_getaffinity interception from linux'shim, FreeBSD su… …pporting it too.
2024-01-31fmtThe Miri Conjob Bot-4/+1
2024-01-31Merge from rustcThe Miri Conjob Bot-1/+17
2024-01-31Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2024-01-30add num_cpus testDavid Carlier-2/+3
2024-01-30Implement the `mmap64` foreign item.Dan Gohman-2/+122
`mmap64` is like `mmap` but uses a 64-bit integer instead of `off_t` for the offset parameter.
2024-01-30Switch over to rustc's `tracing` crate instead of using our own `log` crateOli Scherer-108/+27
2024-01-30Remove the lifetime from `DiagnosticArgValue`.Nicholas Nethercote-1/+1
Because it's almost always static. This makes `impl IntoDiagnosticArg for DiagnosticArgValue` trivial, which is nice. There are a few diagnostics constructed in `compiler/rustc_mir_build/src/check_unsafety.rs` and `compiler/rustc_mir_transform/src/errors.rs` that now need symbols converted to `String` with `to_string` instead of `&str` with `as_str`, but that' no big deal, and worth it for the simplifications elsewhere.
2024-01-30Update feature names for new stdarchAmanieu d'Antras-2/+2
2024-01-29moving out sched_getaffinity interception from linux'shim, FreeBSD ↵David Carlier-11/+19
supporting it too.
2024-01-29Auto merge of #120451 - RalfJung:miri, r=RalfJungbors-172/+235
Miri subtree update r? `@ghost`
2024-01-28Auto merge of #3181 - devnexen:stat_calls_fbsd, r=RalfJungbors-41/+118
freebsd add *stat calls interception support
2024-01-28tweak commentsRalf Jung-2/+2
2024-01-27fix typo in operator.rsRalf Jung-1/+1
2024-01-26interpret: project_downcast: do not ICE for uninhabited variantsRalf Jung-0/+16
2024-01-26alidate the operand passed to is_val_statically_knownRalf Jung-1/+2
2024-01-26fmtThe Miri Conjob Bot-3/+5
2024-01-26Merge from rustcThe Miri Conjob Bot-2/+115
2024-01-26Preparing for merge from rustcThe Miri Conjob Bot-1/+1
2024-01-25Auto merge of #3233 - RalfJung:trophy, r=RalfJungbors-0/+1
Add portable-atomic-util bug to "bugs found" list At least, reading https://notgull.net/cautionary-unsafe-tale/ it seems fair to say Miri found this bug. `@notgull` please let me know if you are okay with having this listed here.
2024-01-25Auto merge of #119911 - NCGThompson:is-statically-known, r=oli-obkbors-0/+27
Replacement of #114390: Add new intrinsic `is_var_statically_known` and optimize pow for powers of two This adds a new intrinsic `is_val_statically_known` that lowers to [``@llvm.is.constant.*`](https://llvm.org/docs/LangRef.html#llvm-is-constant-intrinsic).` It also applies the intrinsic in the int_pow methods to recognize and optimize the idiom `2isize.pow(x)`. See #114390 for more discussion. While I have extended the scope of the power of two optimization from #114390, I haven't added any new uses for the intrinsic. That can be done in later pull requests. Note: When testing or using the library, be sure to use `--stage 1` or higher. Otherwise, the intrinsic will be a noop and the doctests will be skipped. If you are trying out edits, you may be interested in [`--keep-stage 0`](https://rustc-dev-guide.rust-lang.org/building/suggested.html#faster-builds-with---keep-stage). Fixes #47234 Resolves #114390 `@Centri3`
2024-01-24Auto merge of #118336 - saethlin:const-to-op-cache, r=RalfJungbors-2/+88
Return a finite number of AllocIds per ConstAllocation in Miri Before this, every evaluation of a const slice would produce a new AllocId. So in Miri, this program used to have unbounded memory use: ```rust fn main() { loop { helper(); } } fn helper() { "ouch"; } ``` Every trip around the loop creates a new AllocId which we need to keep track of a base address for. And the provenance GC can never clean up that AllocId -> u64 mapping, because the AllocId is for a const allocation which will never be deallocated. So this PR moves the logic of producing an AllocId for a ConstAllocation to the Machine trait, and the implementation that Miri provides will only produce 16 AllocIds for each allocation. The cache is also keyed on the Instance that the const is evaluated in, so that equal consts evaluated in two functions will have disjoint base addresses. r? RalfJung
2024-01-24a bit of refactoring for find_mir_or_eval_fnRalf Jung-43/+15
2024-01-24add __cxa_thread_atexit_impl on freebsdRalf Jung-0/+1