Skip to content

c_import: a c facade over a static inline whose body the translator could not render is accepted silently and traps at run time #2244

Closed

Description

@ehartford

Found on #2240 while a migrator change broke the static-inline body translation: behav_c_facade_free_callback.w (c facade calls: fn maybe_apply … nullable param 0 over static inline int maybe_apply(visit_fn visit, void *ctx)) compiled with no diagnostic, the inline function got no MIR body at all (--dump-mir lists 0 of the 5 inline functions main lists), the program linked, and the call trapped at run time (exit 133). The omission is recorded (ci_record_omitted_symbol_cat … inexpressible) and nothing refuses the facade that names the omitted function. A facade clause over a function whose body could not be rendered must be a compile error naming the function and the reason (the same loudness a migration failure has); a stub that traps is the placeholder class AGENTS.md forbids. Repro: on the #2240 branch before f1 (the body-copy rule change), check that test with stage1.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions