FAILURE MAP
← Case archive

FA-10751 / Raster memory layout / Open access

Pixel unpack alignment · case 01

Row addresses ignore required unpack padding.

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

ROOT CAUSE

Row addresses ignore required unpack padding.

VERIFIED REPAIR

Use the stage contract: Round nonnegative row-byte length upward to a multiple of positive integer unpack alignment; aligned and empty rows stay unchanged.

Unsuccessful approach: Unconditionally advancing to the next alignment block adds padding to already aligned rows.

Case contract

Round nonnegative row-byte length upward to a multiple of positive integer unpack alignment; aligned and empty rows stay unchanged.

Why this case matters

A deterministic software graphics stage with explicit channel and coordinate conventions; no hardware, device profile or API behavior is inferred.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(row_bytes, alignment):
    return row_bytes
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(3, 4)), 4)
check('fixture 2', solve(*(4, 4)), 4)
check('fixture 3', solve(*(0, 4)), 0)
check('fixture 4', solve(*(9, 8)), 16)
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
fixture 134Failed
fixture 244Passed
fixture 300Passed
fixture 4916Failed

SHA-256 / 62605d7e1ed2171264da05346e1facf1577f58bf5ad62af38a690bda2b133c05

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(row_bytes, alignment):
    return (row_bytes//alignment+1)*alignment
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(3, 4)), 4)
check('fixture 2', solve(*(4, 4)), 4)
check('fixture 3', solve(*(0, 4)), 0)
check('fixture 4', solve(*(9, 8)), 16)
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
fixture 144Passed
fixture 284Failed
fixture 340Failed
fixture 41616Passed

SHA-256 / 706b2f96363d6441eafdfdff0e68d67786388f6974cf8dc128b61019a3f9a22f

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(row_bytes, alignment):
    return ((row_bytes+alignment-1)//alignment)*alignment
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(3, 4)), 4)
check('fixture 2', solve(*(4, 4)), 4)
check('fixture 3', solve(*(0, 4)), 0)
check('fixture 4', solve(*(9, 8)), 16)
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
fixture 144Passed
fixture 244Passed
fixture 300Passed
fixture 41616Passed

SHA-256 / 2313863052478267639f408ab15c0ee5bf8459296df21771da7bef0950c04c02

Verification & scope

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

Case digest / 6b294f6bec565129f965123d9ce00ede253d96dedb571c4d2e6041f46d40d349