FA-89991 / Bytecode virtual machines / Open access
Line table: zero deltas treated as no-line markers · case 01
Instructions that stay on the same line report no line, while true markers subtract 128.
ROOT CAUSE
The marker check compares the decoded delta with 0 instead of -128.
THE FAILURE
The marker check compares the decoded delta with 0 instead of -128.
Unsuccessful approach: Checking for 128 after decoding can never match, so markers still shift the running line.
Case contract
Delta-encoded line table: each pair [addr_delta, line_delta] advances the bytecode address by addr_delta two-byte code units and the line by line_delta, a byte to be read as signed (values >= 128 mean value - 256). A decoded delta of -128 marks "no line" (None) at that address and does not move the running line. Offset 0 implicitly maps to first. A byte offset q maps to the last entry whose address is <= q (later entries at the same address win). Return the line for each query.
Why this case matters
Tracebacks and debuggers depend on exact decoding of compact line tables.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import bisect
N = 1
observations = []
def solve(first, pairs, queries):
starts, lines = [0], [first]
addr, line = 0, first
for ad, ld in pairs:
addr += ad * 2
if ld >= 128:
ld -= 256
if ld == 0:
starts.append(addr)
lines.append(None)
continue
line += ld
starts.append(addr)
lines.append(line)
out = []
for q in queries:
i = bisect.bisect_right(starts, q) - 1
out.append(lines[i])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('offset before the first entry maps to first line',
(101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [0, 2]),
[101, 101]),
('regression: exact entry offsets',
(101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [4, 10]),
[102, 105]),
('interior offsets',
(101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [5, 12]),
[102, 105]),
('no-line marker',
(101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [18, 19]),
[None, None]),
('line resumes after marker',
(101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [22, 23]),
[109, 109]),
('negative line delta',
(101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [24, 30]),
[103, 103]),
('zero line delta keeps line',
(101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [34, 36]),
[103, 103]),
('control: past the last entry',
(101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [38, 90]),
[110, 110])],
[('offset before the first entry maps to first line',
(102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [0, 2]),
[102, 102]),
('regression: exact entry offsets',
(102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [4, 10]),
[103, 106]),
('interior offsets',
(102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [5, 12]),
[103, 106]),
('no-line marker',
(102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [18, 19]),
[None, None]),
('line resumes after marker',
(102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [22, 23]),
[111, 111]),
('negative line delta',
(102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [24, 30]),
[105, 105]),
('zero line delta keeps line',
(102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [34, 36]),
[105, 105]),
('control: past the last entry',
(102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [38, 90]),
[112, 112])],
[('offset before the first entry maps to first line',
(103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [0, 2]),
[103, 103]),
('regression: exact entry offsets',
(103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [4, 10]),
[104, 107]),
('interior offsets',
(103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [5, 12]),
[104, 107]),
('no-line marker',
(103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [18, 19]),
[None, None]),
('line resumes after marker',
(103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [22, 23]),
[113, 113]),
('negative line delta',
(103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [24, 30]),
[107, 107]),
('zero line delta keeps line',
(103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [34, 36]),
[107, 107]),
('control: past the last entry',
(103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [38, 90]),
[114, 114])],
[('offset before the first entry maps to first line',
(104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [0, 2]),
[104, 104]),
('regression: exact entry offsets',
(104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [4, 10]),
[105, 108]),
('interior offsets',
(104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [5, 12]),
[105, 108]),
('no-line marker',
(104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [18, 19]),
[None, None]),
('line resumes after marker',
(104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [22, 23]),
[115, 115]),
('negative line delta',
(104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [24, 30]),
[109, 109]),
('zero line delta keeps line',
(104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [34, 36]),
[109, 109]),
('control: past the last entry',
(104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [38, 90]),
[116, 116])],
[('offset before the first entry maps to first line',
(105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [0, 2]),
[105, 105]),
('regression: exact entry offsets',
(105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [4, 10]),
[106, 109]),
('interior offsets',
(105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [5, 12]),
[106, 109]),
('no-line marker',
(105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [18, 19]),
[None, None]),
('line resumes after marker',
(105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [22, 23]),
[117, 117]),
('negative line delta',
(105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [24, 30]),
[111, 111]),
('zero line delta keeps line',
(105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [34, 36]),
[111, 111]),
('control: past the last entry',
(105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [38, 90]),
[118, 118])]]
for label, args, expected in cases[N - 1]:
check(label, solve(*args), expected)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| offset before the first entry maps to first line | [101, 101] | [101, 101] | Passed |
| regression: exact entry offsets | [102, 105] | [102, 105] | Passed |
| interior offsets | [102, 105] | [102, 105] | Passed |
| no-line marker | [-23, -23] | [None, None] | Failed |
| line resumes after marker | [-19, -19] | [109, 109] | Failed |
| negative line delta | [-25, -25] | [103, 103] | Failed |
| zero line delta keeps line | [None, None] | [103, 103] | Failed |
| control: past the last entry | [-18, -18] | [110, 110] | Failed |
SHA-256 / 1c1953a7db9edda402ec556acbf57ee255cc99938c4692112005ee6a3258c5eb
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
import bisect
N = 1
observations = []
def solve(first, pairs, queries):
starts, lines = [0], [first]
addr, line = 0, first
for ad, ld in pairs:
addr += ad * 2
if ld >= 128:
ld -= 256
if ld == 128:
starts.append(addr)
lines.append(None)
continue
line += ld
starts.append(addr)
lines.append(line)
out = []
for q in queries:
i = bisect.bisect_right(starts, q) - 1
out.append(lines[i])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
cases = [[('offset before the first entry maps to first line',
(101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [0, 2]),
[101, 101]),
('regression: exact entry offsets',
(101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [4, 10]),
[102, 105]),
('interior offsets',
(101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [5, 12]),
[102, 105]),
('no-line marker',
(101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [18, 19]),
[None, None]),
('line resumes after marker',
(101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [22, 23]),
[109, 109]),
('negative line delta',
(101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [24, 30]),
[103, 103]),
('zero line delta keeps line',
(101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [34, 36]),
[103, 103]),
('control: past the last entry',
(101, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 4], [1, 250], [5, 0], [2, 7]], [38, 90]),
[110, 110])],
[('offset before the first entry maps to first line',
(102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [0, 2]),
[102, 102]),
('regression: exact entry offsets',
(102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [4, 10]),
[103, 106]),
('interior offsets',
(102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [5, 12]),
[103, 106]),
('no-line marker',
(102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [18, 19]),
[None, None]),
('line resumes after marker',
(102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [22, 23]),
[111, 111]),
('negative line delta',
(102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [24, 30]),
[105, 105]),
('zero line delta keeps line',
(102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [34, 36]),
[105, 105]),
('control: past the last entry',
(102, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 5], [1, 250], [5, 0], [2, 7]], [38, 90]),
[112, 112])],
[('offset before the first entry maps to first line',
(103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [0, 2]),
[103, 103]),
('regression: exact entry offsets',
(103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [4, 10]),
[104, 107]),
('interior offsets',
(103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [5, 12]),
[104, 107]),
('no-line marker',
(103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [18, 19]),
[None, None]),
('line resumes after marker',
(103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [22, 23]),
[113, 113]),
('negative line delta',
(103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [24, 30]),
[107, 107]),
('zero line delta keeps line',
(103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [34, 36]),
[107, 107]),
('control: past the last entry',
(103, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 6], [1, 250], [5, 0], [2, 7]], [38, 90]),
[114, 114])],
[('offset before the first entry maps to first line',
(104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [0, 2]),
[104, 104]),
('regression: exact entry offsets',
(104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [4, 10]),
[105, 108]),
('interior offsets',
(104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [5, 12]),
[105, 108]),
('no-line marker',
(104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [18, 19]),
[None, None]),
('line resumes after marker',
(104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [22, 23]),
[115, 115]),
('negative line delta',
(104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [24, 30]),
[109, 109]),
('zero line delta keeps line',
(104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [34, 36]),
[109, 109]),
('control: past the last entry',
(104, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 7], [1, 250], [5, 0], [2, 7]], [38, 90]),
[116, 116])],
[('offset before the first entry maps to first line',
(105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [0, 2]),
[105, 105]),
('regression: exact entry offsets',
(105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [4, 10]),
[106, 109]),
('interior offsets',
(105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [5, 12]),
[106, 109]),
('no-line marker',
(105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [18, 19]),
[None, None]),
('line resumes after marker',
(105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [22, 23]),
[117, 117]),
('negative line delta',
(105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [24, 30]),
[111, 111]),
('zero line delta keeps line',
(105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [34, 36]),
[111, 111]),
('control: past the last entry',
(105, [[2, 1], [3, 2], [0, 1], [4, 128], [2, 8], [1, 250], [5, 0], [2, 7]], [38, 90]),
[118, 118])]]
for label, args, expected in cases[N - 1]:
check(label, solve(*args), expected)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| offset before the first entry maps to first line | [101, 101] | [101, 101] | Passed |
| regression: exact entry offsets | [102, 105] | [102, 105] | Passed |
| interior offsets | [102, 105] | [102, 105] | Passed |
| no-line marker | [-23, -23] | [None, None] | Failed |
| line resumes after marker | [-19, -19] | [109, 109] | Failed |
| negative line delta | [-25, -25] | [103, 103] | Failed |
| zero line delta keeps line | [-25, -25] | [103, 103] | Failed |
| control: past the last entry | [-18, -18] | [110, 110] | Failed |
SHA-256 / 316e06650acb4d5629f8abfb30f1b091eb90cebd9ba87e484d10c72ab1bf605a
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 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
A deterministic, bounded teaching model of one bytecode virtual machine mechanism with a stipulated instruction encoding; it is not a production VM and claims no conformance to any real specification. 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:51:22.689256+00:00.
Case digest / ef045dba8ce1d4e5b1b34dd2038c85d5a232d19e2e533b2730c658ecd82fe19b