FAILURE MAP
← Case archive

FA-42846 / Borrow checking / Open access

Different allocation roots become aliases when projection depths differ · case 01

Different allocation roots become aliases when projection depths differ.

Verified by executionVariant 1 · 13 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The static analyzer mishandles root identity: different allocation roots become aliases when projection depths differ.

THE FAILURE

The static analyzer mishandles root identity: different allocation roots become aliases when projection depths differ.

Unsuccessful approach: The partial repair uses if a[0] != b[0] and len(a)==len(b): return False, which still violates the stipulated analysis contract.

Case contract

Places are lists of projections: root name, then fields or integer indices. Different roots and unequal fields or known indices are disjoint. A wildcard index ? aliases any index. A union projection | overlaps any sibling. Dereference * conservatively overlaps another projection at that depth. Prefix places overlap; empty denotes no place. Return overlap.

Why this case matters

A finite offline static-analysis model of ownership and borrowing; it does not execute the analyzed program.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(a, b):
    if not a or not b: return False
    if False: return False
    for x, y in zip(a[1:], b[1:]):
        if x == y: continue
        if x == '|' or y == '|': return True
        if x == '*' or y == '*': return True
        if x == '?' and isinstance(y, int): continue
        if y == '?' and isinstance(x, int): continue
        if isinstance(x, int) and isinstance(y, int): return False
        if isinstance(x, str) and isinstance(y, str): return False
        return False
    return True
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('absent',solve([],['r']),False)
check('both absent',solve([],[]),False)
check('roots depths',solve(['r'],['s','a']),False)
check('shared prefix',solve(['r','a','b'],['r','a','c']),False)
check('union',solve(['r','|'],['r','a']),True)
check('deref',solve(['r','*'],['r','a']),True)
check('dynamic left',solve(['r','?'],['r',N]),True)
check('dynamic right',solve(['r',N],['r','?']),True)
check('separated indices',solve(['r',N],['r',N+3]),False)
check('adjacent indices',solve(['r',N],['r',N+1]),False)
check('fields',solve(['r','a'],['r','b']),False)
check('parent',solve(['r'],['r','a']),True)
check('same',solve(['r',N],['r',N]),True)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
absentFalseFalsePassed
both absentFalseFalsePassed
roots depthsTrueFalseFailed
shared prefixFalseFalsePassed
unionTrueTruePassed
derefTrueTruePassed
dynamic leftTrueTruePassed
dynamic rightTrueTruePassed
separated indicesFalseFalsePassed
adjacent indicesFalseFalsePassed
fieldsFalseFalsePassed
parentTrueTruePassed
sameTrueTruePassed

SHA-256 / 17afa0e0a90e5bd94a22659833e8c5bb296214743f18f627a420c0c50029f108

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(a, b):
    if not a or not b: return False
    if a[0] != b[0] and len(a)==len(b): return False
    for x, y in zip(a[1:], b[1:]):
        if x == y: continue
        if x == '|' or y == '|': return True
        if x == '*' or y == '*': return True
        if x == '?' and isinstance(y, int): continue
        if y == '?' and isinstance(x, int): continue
        if isinstance(x, int) and isinstance(y, int): return False
        if isinstance(x, str) and isinstance(y, str): return False
        return False
    return True
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('absent',solve([],['r']),False)
check('both absent',solve([],[]),False)
check('roots depths',solve(['r'],['s','a']),False)
check('shared prefix',solve(['r','a','b'],['r','a','c']),False)
check('union',solve(['r','|'],['r','a']),True)
check('deref',solve(['r','*'],['r','a']),True)
check('dynamic left',solve(['r','?'],['r',N]),True)
check('dynamic right',solve(['r',N],['r','?']),True)
check('separated indices',solve(['r',N],['r',N+3]),False)
check('adjacent indices',solve(['r',N],['r',N+1]),False)
check('fields',solve(['r','a'],['r','b']),False)
check('parent',solve(['r'],['r','a']),True)
check('same',solve(['r',N],['r',N]),True)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
absentFalseFalsePassed
both absentFalseFalsePassed
roots depthsTrueFalseFailed
shared prefixFalseFalsePassed
unionTrueTruePassed
derefTrueTruePassed
dynamic leftTrueTruePassed
dynamic rightTrueTruePassed
separated indicesFalseFalsePassed
adjacent indicesFalseFalsePassed
fieldsFalseFalsePassed
parentTrueTruePassed
sameTrueTruePassed

SHA-256 / af19a81a203a8c4ad6a12804ba4e0c17a95b1726ea9b33e9977c38d5525bb0ae

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 13 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

The explicitly stated toy language is the complete scope; this is not a production compiler or a claim about Rust semantics. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:43:56.304675+00:00.

Case digest / 2320e5b0d7cd8591dabb819deef47f2533ed44efedb88c2c26ec9f68fa972fa5