Skip to content

validate-ownership: async/scope programs fail with "ownership terminator place has no concrete MIR type" #1411

Closed

Description

@ehartford

Found while sweeping --validate-all over test/, examples/, lib/std for #1394 (compiler: origin/main dd786a4 plus the #1394 validator commit, which does not touch this check).

16 corpus files fail validate-all before the ownership rules run, all async/scope programs, e.g.:

test/spec/spec_ss14_9_scope_no_runtime.w   ownership MIR: fn sym768 bb3: ownership terminator place has no concrete MIR type
test/behavior/behav_scope_spawn.w          ownership MIR: fn sym768 bb4: ...
test/spec/spec_ss14_async_await.w          ownership MIR: fn sym779 bb5: ...
examples/async-auction.w                   ownership MIR: fn sym814 bb12: ...
examples/channels/pipeline.w               ownership MIR: fn sym774 bb15: ...

Full list: behav_async_scope*.w, behav_scope_.w, spec_ss14_{6,7,8,9,16,22}.w, spec_ss14_async_await.w, async-collection-await.w, ephemerality_and_lowering(_test).w.

The TK_CALL destination place of some call in these bodies has no MIR type (stored 0 and the typed walk yields none), so mir_validate_place_type returns 0 in validate_ownership_body (src/MirCore.w). Expected: every call destination has a concrete type; validate-all ok on these programs. Likely related to #1305 (async lowering types a call-result local as the awaited T rather than Task[T]).

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