8000 Fuzz fix 2 by g-r-a-n-t · Pull Request #1311 · argotorg/fe · GitHub
[go: up one dir, main page]

Skip to content

Fuzz fix 2#1311

Open
g-r-a-n-t wants to merge 8 commits intoargotorg:masterfrom
g-r-a-n-t:fuzz-fix2
Open

Fuzz fix 2#1311
g-r-a-n-t wants to merge 8 commits intoargotorg:masterfrom
g-r-a-n-t:fuzz-fix2

Conversation

@g-r-a-n-t
Copy link
Collaborator
@g-r-a-n-t g-r-a-n-t commented Mar 2, 2026
# Commit Area Why It Exists What It Changes Main Coverage
1 eff91898e hir: avoid self-assumptions in trait headers HIR trait headers Trait headers could recurse through invalid self-assumptions involving associated projections. Stops trait-header self-assumptions and adds direct regression coverage. trait_header_assoc_projection_recursive_bound.fe
2 accc364f6 hir: recover trait-ref and assoc-bound cycles as diagnostics HIR trait lowering and constraint expansion Several recursive trait and assoc-bound cases could hang or panic instead of surfacing a normal error. Adds cycle recovery in lower_trait_ref, makes recursive bound expansion safer, keeps unnamed impl methods from poisoning trait collection, and covers the affected crash-regression paths. 499d4ead, 1670ec70, acb16143, a8d7d78c, assoc_ty_cycle
3 11316942b hir: harden associated-type resolution and normalization HIR assoc-type resolution Assoc-type lookup and normalization could reuse bad inference state or hit panic paths, especially around qualified traits. Hardens canonicalization, normalization, unify remapping, and qualified-trait / assoc-type resolution. b02aa0c9, c2482ead, 7856b3f9
4 f2250a523 hir: harden malformed impl and pattern analysis HIR pattern analysis and ops selection Malformed impls and malformed patterns could still reach panic or unreachable!() paths during analysis. Turns ops-selection failures into diagnostics and makes malformed pattern cases recoverable instead of fatal. a64bec5e, 76e16ce9, 25d24f34, b8fc85b7
5 e81f3c594 mir/index: avoid scalar address-space lookup on by-value indexing MIR indexing / repr queries MIR could query scalar address-space information for by-value indexing cases where that lookup is not meaningful. Narrows the MIR-side fix to the address-space/indexing issue only, without keeping the older invalid-HIR fallback machinery. by-value indexing / repr-address-space lowering path
6 d51fafedf mir: short-circuit diagnostics and lowering on invalid HIR Driver, CLI, LSP, MIR entry points MIR work was still being attempted after HIR had already failed, and the behavior could diverge by entry point. Centralizes MIR diagnostics flow and stops MIR lowering/diagnostics from running on already-invalid HIR. This commit also owns the invalid-HIR crash fixtures that used to motivate the old MIR fallback. mir_borrow_operand_not_place.fe, mir_match_lowering_non_ref_projection_d58afcf7.fe, mir_value_address_space_fallback_143863d4.fe, monomorphize_failed_instantiate_from_parse_error.fe, monomorphize_unlowered_hir_expr_survives.fe, monomorphize_unresolved_trait_method.fe
7 6195de534 tests: minimize coverage-only crash fixtures Regression test corpus A few leftover crash fixtures were still coverage-only cleanup rather than owning a distinct semantic fix. Keeps the cleanup isolated to the residual tests-only reductions that did not clearly belong to one owning fix commit. hir_pretty_print_missing_param_name_5ecc2069.fe and related coverage-only fixture cleanup
8 8cadca252 tests: refresh inline Fe snippets for current parser syntax Test maintenance only Some inline Fe snippets and parser-facing fixtures were stale after the history cleanup and caused otherwise unrelated tests to fail. Updates codegen/MIR/parser-facing test inputs to current Fe syntax. This is a tests-only maintenance commit, not a fuzz-fix semantic change. crates/codegen/src/sonatina/tests.rs, crates/mir/src/transform.rs, parser-facing fixtures

@g-r-a-n-t g-r-a-n-t marked this pull request as draft March 2, 2026 00:52
Copy link
@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c2c6b91388

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@g-r-a-n-t g-r-a-n-t force-pushed the fuzz-fix2 branch 5 times, most recently from f8a25e5 to aeec92d Compare March 3, 2026 00:17
@g-r-a-n-t g-r-a-n-t marked this pull request as ready for review March 3, 2026 00:25
Copy link
@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aeec92d371

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@sbillig
Copy link
Collaborator
sbillig commented Mar 3, 2026

Some good stuff in here, but also some cases that are papering over real bugs by working around panics. These panics let the fuzzer find bugs; if we just remove them all with fallbacks the fuzzing becomes useless.

@g-r-a-n-t g-r-a-n-t force-pushed the fuzz-fix2 branch 6 times, most recently from a50f8fd to 3992bb3 Compare March 4, 2026 22:21
@g-r-a-n-t g-r-a-n-t marked this pull request as draft March 4, 2026 22:41
@g-r-a-n-t g-r-a-n-t force-pushed the fuzz-fix2 branch 4 times, most recently from e51641c to 5892bcc Compare March 5, 2026 15:21
@g-r-a-n-t g-r-a-n-t marked this pull request as ready for review March 5, 2026 15:31
@g-r-a-n-t g-r-a-n-t requested a review from sbillig March 5, 2026 15:31
Copy link
@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5892bcc750

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@sbillig
Copy link
Collaborator
sbillig commented Mar 5, 2026

@g-r-a-n-t Do you mind if I push a few commits to this branch?

@g-r-a-n-t
Copy link
Collaborator Author

@g-r-a-n-t Do you mind if I push a few commits to this branch?

Please do.

@g-r-a-n-t g-r-a-n-t force-pushed the fuzz-fix2 branch 4 times, most recently from 57eb711 to 20b6efd Compare March 10, 2026 00:05
@g-r-a-n-t g-r-a-n-t marked this pull request as draft March 10, 2026 01:28
@g-r-a-n-t g-r-a-n-t force-pushed the fuzz-fix2 branch 2 times, most recently from 7fe04e1 to ed9aca8 Compare March 19, 2026 17:04
@g-r-a-n-t g-r-a-n-t marked this pull request as ready for review March 20, 2026 03:20
Copy link
@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8cadca2522

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

< BEA4 ul dir="auto">
  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".
  • If Codex has suggestions, it will comment; otherwise it will react with 👍.

    When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

    Comment on lines +1226 to +1228
    let folded_inst_keys = inference_keys(db, &folded_inst);
    let folded_ty_keys = inference_keys(db, &folded_ty);
    if folded_inst_keys.is_subset(&lhs_keys) && folded_ty_keys.is_subset(&lhs_keys) {

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    P1 Badge Keep bound-carried generics when resolving associated types

    In find_associated_type, this new lhs_keys filter drops any candidate whose projection still mentions a generic that comes from the trait bound rather than from Self. That breaks valid cases like where U: Trait<T> followed by U::Assoc: after unification, folded_ty still contains T, so the candidate is discarded and the path resolves as “not found” even though the bound uniquely defines the associated type. The same pattern affects nested projections that depend on extra bound arguments.

    Useful? React with 👍 / 👎.

    Comment on lines +242 to +244
    let (expected_base, _) = expected_ty.decompose_ty_app(db);
    let (resolved_base, _) = ty_id.decompose_ty_app(db);
    if expected_base == resolved_base {

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    P2 Badge Preserve explicit type arguments in constructor patterns

    This base-type check is broad enough to fire for explicitly written generic patterns like Foo<bool> against a Foo<i32> scrutinee. Once it does, the branch below rewrites the constructor to expected_ty, so exhaustiveness/reachability analysis treats the invalid arm as if it were Foo<i32>. That can produce bogus unreachable pattern or missing-arm diagnostics whenever a struct/tuple pattern names the right constructor with the wrong type arguments.

    Useful? React with 👍 / 👎.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    None yet

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants

    0