Skip to content

Panics in shipped code that bad input may reach #175

Open

Description

@Kinflou

Two panics in non-test code could take input a user controls:

  • ProjectContext::find_schema_by_filename (package/config/ir/context.rs:150) panics with "Only disk lookups are supported at the moment" for a package not loaded from disk. Checked: not reachable today. Its only caller freezes a schema_paths key, and schema_paths is no longer a recognised config.idp key: interpreting a virtual package with it returns "'schema_paths' is not a recognised package-manifest key" before the freezing code runs. The branch is dead code.
  • from_source (schema/ir/compiler/mod.rs:36) panics on a syntax error. Only a test calls it today, but it's a public entry point.

Fix: return an error from from_source, and remove the dead schema_paths freezing branch (or return an error from it).

Found on core master (a8aee68). The autodoc todo!() stubs are already core#101.

Activity

  1. added
    bugSomething isn't working
    P3Eventually
    choreMaintenance, cleanup, quality
    and removed
    bugSomething isn't working
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3EventuallychoreMaintenance, cleanup, qualitycompilerParser, IR, CAS

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions