CNA-BUG-214: docs/c-api/HANDLES.md documents CNA_RESULT_SHUTTING_DOWN for a closing or closed runtime, but no C API route ever returns it

CNA snapshot 009d40f5  ·  Known Issues › Current bugs  ·  source links pinned to 009d40f5

✓

Evidence basis: source-verified at the pinned commit; tests exist (not executed for this page). Claims on this page were checked by reading the CNA source at commit 009d40f5; unless a sentence says otherwise, nothing here was built or executed. Nothing on this page was executed unless the Evidence section says so.

abi.h defines CNA_RESULT_SHUTTING_DOWN and HANDLES.md maps a closing runtime to it, but no route returns it and the registry has no shutdown state, so a stale handle answers CNA_RESULT_INVALID_HANDLE.

Identifier
CNA-BUG-214
Category
Bug
Subsystem
C API & bindings
Status
Open
Verified against
CNA 009d40f5 (009d40f5dd085c4e674d3479675fac84b12b3e0a)
Severity
Low (a triage suggestion, not a project priority)
Evidence basis
Source-verified: read at TARGET, not executed
Tests touching this area
Yes: see Current tests
Affected contract
CNA_RESULT_SHUTTING_DOWN (abi.h); the HANDLES.md validation table

Expected behaviour

HANDLES.md: “Runtime is closing or closed → CNA_RESULT_SHUTTING_DOWN”.

Actual behaviour at TARGET

abi.h defines the code; CnaCApiDetail.cpp maps it to an error category in ErrorCategoryForResult; nothing else in modules/c-api/src produces it, and the registry keeps no closing or closed flag. A handle used after its owner was torn down answers CNA_RESULT_INVALID_HANDLE.

Source locations

Evidence

Checked by reading at 009d40f5; not executed.

Focused reproduction

No focused reproduction is known. Nothing has been invented here; the evidence above is what exists.

Current tests

No test expects CNA_RESULT_SHUTTING_DOWN.

Regression test

Either a registry shutdown state with a test that a call during or after shutdown returns the code, or a HANDLES.md row stating CNA_RESULT_INVALID_HANDLE and the code marked reserved.

Blast radius

Bindings that branch on CNA_RESULT_SHUTTING_DOWN never see it.

Workaround

No workaround is known.

The same subject is explained at several altitudes. These are the neighbouring pages at each one.

User guide
C API: model
Known issues
Bug index