about summary refs log tree commit diff
path: root/tests/crashes
AgeCommit message (Collapse)AuthorLines
2025-01-28Properly check that array length is valid type during built-in unsizing in indexMichael Goulet-6/+0
2025-01-27Rollup merge of #136072 - cyrgani:old-crash-tests, r=WaffleLapkinLeón Orell Valerian Liehr-0/+16
add two old crash tests This is for #108248 and #132826.
2025-01-27Add `TooGeneric` variant to `LayoutError` and emit `Unknown` oneFedericoBruzzone-11/+0
- `check-pass` test for a MRE of #135020 - fail test for #135138 - switch to `TooGeneric` for checking CMSE fn signatures - switch to `TooGeneric` for compute `SizeSkeleton` (for transmute) - fix broken tests
2025-01-25add two old crash testscyrgani-0/+16
2025-01-24add a regression testWaffle Lapkin-6/+0
2025-01-22Rollup merge of #135409 - ↵Matthias Krüger-27/+0
Shunpoco:issue-133117-ICE-never-false-edge-start-block, r=Nadrieril Fix ICE-133117: multiple never-pattern arm doesn't have false_edge_start_block Fixes #133117 , and close fixes #133063 , fixes #130779 In order to fix ICE-133117, at first I needed to tackle to ICE-133063 (this fixed 130779 as well). ### ICE-133063 and ICE-130779 This ICE is caused by those steps: 1. An arm has or-pattern, and all of the sub-candidates are never-pattern 2. In that case, all sub-candidates are removed in remove_never_subcandidates(). So the arm (candidate) has no sub-candidate. 3. In the current implementation, if there is no sub-candidate, the function assigns `pre_binding_block` into the candidate ([here](https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir_build/src/builder/matches/mod.rs#L2002-L2004)). However, otherwise_block should be assigned to the candidate as well, because the otherwise_block is unwrapped in multiple place (like in lower_match_tree()). As a result, it causes the panic. I simply added the same block as pre_binding_block into otherwise_block, but I'm wondering if there is a better block to assign to otherwise_block (is it ok to assign the same block into pre_binding and otherwise?) ### ICE-133117 This is caused by those steps: 1. There are two arms, both are or-pattern and each has one match-pair (in the test code, both are `(!|!)`), and the second arm has a guard. 2. In match_candidate() for the first arm, it expands the second arm’s sub-candidates as well ([here](https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir_build/src/builder/matches/mod.rs#L1800-L1805)). As a result, the root candidate of the second arm is not evaluated/modified in match_candidate(). So a false_edge_start_block is not assigned to the candidate. 3. merge_trivial_subcandidates() is called against the candidate for the second arm. It just returns immediately because the candidate has a guard. So a flase_edge_start_block is not assigned to the candidate also in this function. 4. remove_never_subcandidates() is called against the candidate. Since all sub-candidates are never-pattern. they are removed. 5. In lower_match_tree(), since there is no sub-candidate for the candidate, the candidate itself is evaluated in visit_leave_rev ([here](https://github.com/rust-lang/rust/blob/master/compiler/rustc_mir_build/src/builder/matches/mod.rs#L1532)). Because the candidate has no false_edge_start_block, it causes the panic. So I modified the order of if blocks in merge_trivial_subcandidates() to assign a false_edge_start_block if the candidate doesn't have.
2025-01-18Rollup merge of #135611 - chenyukang:yukang-fix-135341-ice-crash, r=oli-obkMatthias Krüger-5/+0
Remove unnecessary assertion for reference error Fixes #135341 From comment: https://github.com/rust-lang/rust/issues/135341#issuecomment-2594430504 r? ``@oli-obk``
2025-01-17Rollup merge of #134980 - lqd:polonius-next-episode-7, r=jackh726Matthias Krüger-14/+0
Location-sensitive polonius prototype: endgame This PR sets up the naive location-sensitive analysis end-to-end, and replaces the location-insensitive analysis. It's roughly all the in-progress work I wanted to land for the prototype, modulo cleanups I still want to do after the holidays, or the polonius debugger, and so on. Here, we traverse the localized constraint graph, have to deal with kills and time-traveling (👌), and record that as loan liveness for the existing scope and active loans computations. Then the near future looks like this, especially if the 2025h1 project goal is accepted: - gradually bringing it up to completion - analyzing and fixing the few remaining test failures - going over the *numerous* fixmes in this prototype (one of which is similar to a hang on one test's millions and millions of constraints) - trying to see how to lower the impact of the lack of NLL liveness optimization on diagnostics, and their categorization of local variables and temporaries (the vast majority of blessed expectations differences), as well as the couple ICEs trying to find an NLL constraint to blame for errors. - dealing with the theoretical weakness around kills, conflating reachability for the two TCS, etc that is described ad nauseam in the code. - switching the compare mode to the in-tree implementation, and blessing the diagnostics - apart from the hang, it's not catastrophically slower on our test suite, so then we can try to enable it on CI - checking crater, maybe trying to make it faster :3, etc. I've tried to gradually introduce this PR's work over 4 commits, because it's kind of subtle/annoying, and Niko/I are not completely convinced yet. That one comment explaining the situation is maybe 30% of the PR 😓. Who knew that spacetime reachability and time-traveling could be mind bending. I kinda found this late and the impact on this part of the computation was a bit unexpected to us. A bit more care/thought will be needed here. I've described my plan in the comments though. In any case, I believe we have the current implementation is a conservative approximation that shouldn't result in unsoundness but false positives at worst. So it feels fine for now. r? ``@jackh726`` --- Fixes #127628 -- which was a assertion triggered for a difference in loan computation between NLLs and the location-insensitive analysis. That doesn't exist anymore so I've removed this crash test.
2025-01-17remove unnecessary assertion for reference erroryukang-5/+0
2025-01-14fix ICE with references to infinite structs in constsLukas Markeffsky-67/+0
2025-01-12Remove solved crashesShunpoco-27/+0
Signed-off-by: Shunpoco <tkngsnsk313320@gmail.com>
2025-01-12add more crash testsMatthias Krüger-0/+56
2025-01-12remove location-insensitive ICE testRémy Rakic-14/+0
2025-01-09Always take the `Ok` path in `lit_to_const` and produce error constants insteadOli Scherer-16/+0
2025-01-04crashes: add latest batch of testsMatthias Krüger-0/+184
2025-01-04Auto merge of #135057 - compiler-errors:project-unconstrained, r=oli-obkbors-81/+0
Project to `TyKind::Error` when there are unconstrained non-lifetime (ty/const) impl params It splits the `enforce_impl_params_are_constrained` function into lifetime/non-lifetime, and queryfies the latter. We can then use the result of the latter query (`Result<(), ErrorGuaranteed>`) to intercept projection and constrain the projected type to `TyKind::Error`, which ensures that we leak no ty or const vars to places that don't expect them, like `normalize_erasing_regions`. The reason we split `enforce_impl_params_are_constrained` into two parts is because we only error for *lifetimes* if the lifetime ends up showing up in any of the associated types of the impl (e.g. we allow `impl<'a> Foo { type Assoc = (); }`). However, in order to compute the `type_of` query for the anonymous associated type of an RPITIT, we need to do trait solving (in `query collect_return_position_impl_trait_in_trait_tys`). That would induce cycles. Luckily, it turns out for lifetimes we don't even care about if they're unconstrained, since they're erased in all contexts that we are trying to fix ICEs. So it's sufficient to keep this check separated out of the query. I think this is a bit less invasive of an approach compared to #127973. The major difference between this PR and that PR is that we queryify the check instead of merging it into the `explicit_predicates_of` query, and we use the result to taint just projection goals, rather than trait goals too. This doesn't require a lot of new tracking in `ItemCtxt` and `GenericPredicates`, and it also seems to not require any other changes to typeck like that PR did. Fixes #123141 Fixes #125874 Fixes #126942 Fixes #127804 Fixes #130967 r? oli-obk
2025-01-03Do not project when there are unconstrained impl paramsMichael Goulet-81/+0
2025-01-02taint fcx on selection errors during unsizingLukas Markeffsky-13/+0
2025-01-01Fix ICE when opaque captures a duplicated/invalid lifetimeMichael Goulet-9/+0
2024-12-29Auto merge of #134627 - estebank:issue-133252, r=jackh726bors-43/+0
Avoid ICE in borrowck Provide a fallback in `best_blame_constraint` when `find_constraint_paths_between_regions` doesn't have a result. This code is due a rework to avoid the letf-over `unwrap()`, but avoids the ICE caused by the repro. Fix #133252.
2024-12-27Rollup merge of #134798 - compiler-errors:err-auto, r=jackh726Matthias Krüger-23/+0
Make `ty::Error` implement all auto traits I have no idea what's up with the crashes test I fixed--I really don't want to look into it since it has to do something with borrowck and multiple layers of opaques. I think the underlying idea of allowing error types to implement all auto traits is justified though. Fixes #134796 Fixes #131050 r? lcnr
2024-12-26Rollup merge of #131522 - c410-f3r:unlock-rfc-2011, r=chenyukangJacob Pratt-13/+0
[macro_metavar_expr_concat] Fix #128346 Fix #128346 Fix #131393 The syntax is invalid in both issues so I guess that theoretically the compiler should have aborted early. This PR tries to fix a local problem but let me know if there are better options. cc `@petrochenkov` if you are interested
2024-12-26Make ty::Error implement auto traitsMichael Goulet-23/+0
2024-12-21Don't ICE on illegal dyn* castsMichael Goulet-9/+0
2024-12-21Avoid ICE in borrowckEsteban Küber-43/+0
Provide a fallback in `best_blame_constraint` when `find_constraint_paths_between_regions` doesn't have a result. This code is due a rework to avoid the letf-over `unwrap()`, but avoids the ICE caused by the repro. Fix #133252.
2024-12-19Rollup merge of #134506 - oli-obk:push-mrrulszyuslt, r=jieyouxuMatthias Krüger-5/+0
Remove a duplicated check that doesn't do anything anymore. fixes #134005 This code didn't actually `lub` the type of the previous expressions, but just the current type over and over again. Changing it to using the actual expression type does not change anything either, so may as well remove the entire loop.
2024-12-19Remove a duplicated check that doesn't do anything anymore.Oli Scherer-5/+0
2024-12-19Auto merge of #133961 - lcnr:borrowck-cleanup, r=jackh726bors-6/+0
cleanup region handling: add `LateParamRegionKind` The second commit is to enable a split between `BoundRegionKind` and `LateParamRegionKind`, by avoiding `BoundRegionKind` where it isn't necessary. The third comment then adds `LateParamRegionKind` to avoid having the same late-param region for separate bound regions. This fixes #124021. r? `@compiler-errors`
2024-12-18add testslcnr-33/+0
2024-12-18fix crasheslcnr-6/+0
2024-12-15crashes: more testsMatthias Krüger-0/+176
2024-12-14Add a regression test for #134162许杰友 Jieyou Xu (Joe)-8/+0
2024-12-14Rollup merge of #134256 - krtab:suggestion_overlapping, r=petrochenkovMatthias Krüger-5/+0
Use a more precise span in placeholder_type_error_diag Closes: https://github.com/rust-lang/rust/issues/123861
2024-12-14Rollup merge of #134236 - matthiaskrgr:tests12122024, r=compiler-errorsMatthias Krüger-0/+122
crashes: more tests v2 try-job: aarch64-apple try-job: x86_64-msvc try-job: x86_64-gnu
2024-12-13Use a more precise span in placeholder_type_error_diagArthur Carcano-5/+0
Closes: https://github.com/rust-lang/rust/issues/123861
2024-12-12crashes: more tests v2Matthias Krüger-0/+122
2024-12-12crashes: more testsMatthias Krüger-0/+113
2024-12-12Auto merge of #132789 - matthiaskrgr:debug_tests, r=jieyouxubors-0/+146
add some debug-assertion crash tests r? ghost try-job: x86_64-gnu
2024-12-11Auto merge of #128004 - folkertdev:naked-fn-asm, r=Amanieubors-11/+0
codegen `#[naked]` functions using global asm tracking issue: https://github.com/rust-lang/rust/issues/90957 Fixes #124375 This implements the approach suggested in the tracking issue: use the existing global assembly infrastructure to emit the body of `#[naked]` functions. The main advantage is that we now have full control over what gets generated, and are no longer dependent on LLVM not sneakily messing with our output (inlining, adding extra instructions, etc). I discussed this approach with `@Amanieu` and while I think the general direction is correct, there is probably a bunch of stuff that needs to change or move around here. I'll leave some inline comments on things that I'm not sure about. Combined with https://github.com/rust-lang/rust/pull/127853, if both accepted, I think that resolves all steps from the tracking issue. r? `@Amanieu`
2024-12-10codegen `#[naked]` functions using `global_asm!`Folkert-11/+0
2024-12-09dataflow_const_prop: do not eval a ptr address in SwitchIntDianQK-16/+0
2024-12-09Rollup merge of #134036 - matthiaskrgr:opppt, r=saethlinMatthias Krüger-7/+7
crash tests: use individual mir opts instead of mir-opt-level where easily possible r? `@saethlin`
2024-12-08crash tests: use individual mir opts instead of mir-opt-level where easily ↵Matthias Krüger-7/+7
possible
2024-12-08add some debug-assertion crash testsMatthias Krüger-0/+146
2024-12-08crashes: add test for #131451Matthias Krüger-0/+9
2024-12-07Auto merge of #133978 - matthiaskrgr:rollup-6gh1iho, r=matthiaskrgrbors-4/+0
Rollup of 7 pull requests Successful merges: - #130209 (Stabilize `std::io::ErrorKind::CrossesDevices`) - #130254 (Stabilize `std::io::ErrorKind::QuotaExceeded`) - #132187 (Add Extend impls for tuples of arity 1 through 12) - #133875 (handle `--json-output` properly) - #133934 (Do not implement unsafe auto traits for types with unsafe fields) - #133954 (Hide errors whose suggestions would contain error constants or types) - #133960 (rustdoc: remove eq for clean::Attributes) r? `@ghost` `@rustbot` modify labels: rollup
2024-12-06Remove polymorphizationBen Kimock-93/+0
2024-12-06Silence follow-up errors from `lit_to_const`Oli Scherer-4/+0
2024-12-05Stabilize noop_wakerEric Holk-1/+1
Co-authored-by: zachs18 <8355914+zachs18@users.noreply.github.com>
2024-12-04Auto merge of #133818 - matthiaskrgr:rollup-iav1wq7, r=matthiaskrgrbors-43/+0
Rollup of 7 pull requests Successful merges: - #132937 (a release operation synchronizes with an acquire operation) - #133681 (improve TagEncoding::Niche docs, sanity check, and UB checks) - #133726 (Add `core::arch::breakpoint` and test) - #133768 (Remove `generic_associated_types_extended` feature gate) - #133811 ([AIX] change AIX default codemodel=large) - #133812 (Update wasm-component-ld to 0.5.11) - #133813 (compiletest: explain that UI tests are expected not to compile by default) r? `@ghost` `@rustbot` modify labels: rollup