FAILURE MAP
← Case archive

FA-90006 / Bytecode virtual machines / Open access

Line table: address deltas read as bytes instead of code units · case 01

Line boundaries land at half the correct byte offsets.

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

ROOT CAUSE

addr_delta is added as bytes, but it counts two-byte code units.

VERIFIED REPAIR

Advance by addr_delta * 2 bytes.

Unsuccessful approach: Assigning instead of accumulating treats each delta as an absolute address.

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
        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 fixtureActualExpectedOutcome
offset before the first entry maps to first line[101, 102][101, 101]Failed
regression: exact entry offsets[102, None][102, 105]Failed
interior offsets[105, 103][102, 105]Failed
no-line marker[103, 110][None, None]Failed
line resumes after marker[110, 110][109, 109]Failed
negative line delta[110, 110][103, 103]Failed
zero line delta keeps line[110, 110][103, 103]Failed
control: past the last entry[110, 110][110, 110]Passed

SHA-256 / ce82955345d1ee25904f3984c8d029845acba872db8bd9825d880b8742135091

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 fixtureActualExpectedOutcome
offset before the first entry maps to first line[101, 101][101, 101]Passed
regression: exact entry offsets[102, 110][102, 105]Failed
interior offsets[102, 110][102, 105]Failed
no-line marker[110, 110][None, None]Failed
line resumes after marker[110, 110][109, 109]Failed
negative line delta[110, 110][103, 103]Failed
zero line delta keeps line[110, 110][103, 103]Failed
control: past the last entry[110, 110][110, 110]Passed

SHA-256 / ad101dc6fa6ea19d6b27e699a60124445a06185f6ff38a9e8e5dc4c8edf7e94d

3 / The verified repair

Exit 0
"""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 fixtureActualExpectedOutcome
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[None, None][None, None]Passed
line resumes after marker[109, 109][109, 109]Passed
negative line delta[103, 103][103, 103]Passed
zero line delta keeps line[103, 103][103, 103]Passed
control: past the last entry[110, 110][110, 110]Passed

SHA-256 / a22937290d0eabf6bb54d21278f5d5a9b3c813425cad85086e86c124d273d37d

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.645843+00:00.

Case digest / 0310e5e7e81e9c40794fb01819941b503d7b0030b7f34312c8cbb22fdf2a33a7