{"abstract":"An allocation starts at a misaligned cursor even though its padded size is a multiple of alignment.","category":"Runtime and resources","checks":7,"contract":"Cursor and sizes are nonnegative integers; each requested alignment is a positive integer, not necessarily a power of two. Return [starting addresses,final cursor]. Each start is the least aligned address >= cursor, then cursor becomes start+size. Zero-size reservations may consume alignment padding.","evaluation_group":"model-6f20544a8d07a03a","failed_approach":"Always moving to the following alignment boundary wastes a full alignment unit on already aligned addresses.","family":"runtime-allocation-alignment","id":"FA-246","implementations":{"attempt":{"sha256":"bcbc5958cde6bf9ad8272a02f124d5de04295251b5e1196d03978ca930ebe433","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cursor, requests):\n    starts = []\n    for size, alignment in requests:\n        start = (cursor//alignment+1)*alignment\n        starts.append(start)\n        cursor = start+size\n    return [starts, cursor]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unaligned starting cursor', solve(8*N+1, [[N, 8]]), [[8*N+8], 9*N+8])\ncheck('already aligned cursor', solve(8*N, [[N, 8]]), [[8*N], 9*N])\ncheck('non-power-of-two alignment', solve(3*N+1, [[N, 3]]), [[3*N+3], 4*N+3])\ncheck('consecutive different alignments', solve(0, [[N, 1], [N, 8]]), [[0, 8], 8+N])\ncheck('zero-size aligned reservation', solve(8*N, [[0, 8]]), [[8*N], 8*N])\ncheck('no allocation requests', solve(N, []), [[], N])\ncheck('unit alignment adds no padding', solve(N, [[N, 1]]), [[N], 2*N])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"035ce5a00248a87cea45b4678bc3aae6d6847daf15362d3afffbaee5dc10b2bc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cursor, requests):\n    starts = []\n    for size, alignment in requests:\n        starts.append(cursor)\n        cursor += ((size+alignment-1)//alignment)*alignment\n    return [starts, cursor]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unaligned starting cursor', solve(8*N+1, [[N, 8]]), [[8*N+8], 9*N+8])\ncheck('already aligned cursor', solve(8*N, [[N, 8]]), [[8*N], 9*N])\ncheck('non-power-of-two alignment', solve(3*N+1, [[N, 3]]), [[3*N+3], 4*N+3])\ncheck('consecutive different alignments', solve(0, [[N, 1], [N, 8]]), [[0, 8], 8+N])\ncheck('zero-size aligned reservation', solve(8*N, [[0, 8]]), [[8*N], 8*N])\ncheck('no allocation requests', solve(N, []), [[], N])\ncheck('unit alignment adds no padding', solve(N, [[N, 1]]), [[N], 2*N])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"c5391f1ab83111346479c656511a20704acd1e7c8d3e973faa072f4c238db0fc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cursor, requests):\n    starts = []\n    for size, alignment in requests:\n        start = ((cursor+alignment-1)//alignment)*alignment\n        starts.append(start)\n        cursor = start+size\n    return [starts, cursor]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('unaligned starting cursor', solve(8*N+1, [[N, 8]]), [[8*N+8], 9*N+8])\ncheck('already aligned cursor', solve(8*N, [[N, 8]]), [[8*N], 9*N])\ncheck('non-power-of-two alignment', solve(3*N+1, [[N, 3]]), [[3*N+3], 4*N+3])\ncheck('consecutive different alignments', solve(0, [[N, 1], [N, 8]]), [[0, 8], 8+N])\ncheck('zero-size aligned reservation', solve(8*N, [[0, 8]]), [[8*N], 8*N])\ncheck('no allocation requests', solve(N, []), [[], N])\ncheck('unit alignment adds no padding', solve(N, [[N, 1]]), [[N], 2*N])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":" 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"runtime-allocation-alignment","generated_at":"2026-09-29T14:36:51.534948+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Models address arithmetic in an arena allocator without dereferencing memory, and exposes both misalignment and unnecessary padding independent of machine word size.","repair":"Round the current cursor up to the next permitted aligned address, using that address unchanged when already aligned.","root_cause":"Padding is applied to the length rather than to the current address before reservation.","sha256":"b3c1c8339f5944f1aeb5d1073935bbf9b51912d84409cb5adee0d4383dfbb4e6","title":"An arena aligns block size instead of its starting address · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":33.417,"exit_code":1,"observations":[{"actual":[[16],17],"check":"unaligned starting cursor","expected":[[16],17],"passed":true},{"actual":[[16],17],"check":"already aligned cursor","expected":[[8],9],"passed":false},{"actual":[[6],7],"check":"non-power-of-two alignment","expected":[[6],7],"passed":true},{"actual":[[1,8],9],"check":"consecutive different alignments","expected":[[0,8],9],"passed":false},{"actual":[[16],16],"check":"zero-size aligned reservation","expected":[[8],8],"passed":false},{"actual":[[],1],"check":"no allocation requests","expected":[[],1],"passed":true},{"actual":[[2],3],"check":"unit alignment adds no padding","expected":[[1],2],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unaligned starting cursor\", \"actual\": [[16], 17], \"expected\": [[16], 17], \"passed\": true}, {\"check\": \"already aligned cursor\", \"actual\": [[16], 17], \"expected\": [[8], 9], \"passed\": false}, {\"check\": \"non-power-of-two alignment\", \"actual\": [[6], 7], \"expected\": [[6], 7], \"passed\": true}, {\"check\": \"consecutive different alignments\", \"actual\": [[1, 8], 9], \"expected\": [[0, 8], 9], \"passed\": false}, {\"check\": \"zero-size aligned reservation\", \"actual\": [[16], 16], \"expected\": [[8], 8], \"passed\": false}, {\"check\": \"no allocation requests\", \"actual\": [[], 1], \"expected\": [[], 1], \"passed\": true}, {\"check\": \"unit alignment adds no padding\", \"actual\": [[2], 3], \"expected\": [[1], 2], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":33.616,"exit_code":1,"observations":[{"actual":[[9],17],"check":"unaligned starting cursor","expected":[[16],17],"passed":false},{"actual":[[8],16],"check":"already aligned cursor","expected":[[8],9],"passed":false},{"actual":[[4],7],"check":"non-power-of-two alignment","expected":[[6],7],"passed":false},{"actual":[[0,1],9],"check":"consecutive different alignments","expected":[[0,8],9],"passed":false},{"actual":[[8],8],"check":"zero-size aligned reservation","expected":[[8],8],"passed":true},{"actual":[[],1],"check":"no allocation requests","expected":[[],1],"passed":true},{"actual":[[1],2],"check":"unit alignment adds no padding","expected":[[1],2],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unaligned starting cursor\", \"actual\": [[9], 17], \"expected\": [[16], 17], \"passed\": false}, {\"check\": \"already aligned cursor\", \"actual\": [[8], 16], \"expected\": [[8], 9], \"passed\": false}, {\"check\": \"non-power-of-two alignment\", \"actual\": [[4], 7], \"expected\": [[6], 7], \"passed\": false}, {\"check\": \"consecutive different alignments\", \"actual\": [[0, 1], 9], \"expected\": [[0, 8], 9], \"passed\": false}, {\"check\": \"zero-size aligned reservation\", \"actual\": [[8], 8], \"expected\": [[8], 8], \"passed\": true}, {\"check\": \"no allocation requests\", \"actual\": [[], 1], \"expected\": [[], 1], \"passed\": true}, {\"check\": \"unit alignment adds no padding\", \"actual\": [[1], 2], \"expected\": [[1], 2], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":36.491,"exit_code":0,"observations":[{"actual":[[16],17],"check":"unaligned starting cursor","expected":[[16],17],"passed":true},{"actual":[[8],9],"check":"already aligned cursor","expected":[[8],9],"passed":true},{"actual":[[6],7],"check":"non-power-of-two alignment","expected":[[6],7],"passed":true},{"actual":[[0,8],9],"check":"consecutive different alignments","expected":[[0,8],9],"passed":true},{"actual":[[8],8],"check":"zero-size aligned reservation","expected":[[8],8],"passed":true},{"actual":[[],1],"check":"no allocation requests","expected":[[],1],"passed":true},{"actual":[[1],2],"check":"unit alignment adds no padding","expected":[[1],2],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"unaligned starting cursor\", \"actual\": [[16], 17], \"expected\": [[16], 17], \"passed\": true}, {\"check\": \"already aligned cursor\", \"actual\": [[8], 9], \"expected\": [[8], 9], \"passed\": true}, {\"check\": \"non-power-of-two alignment\", \"actual\": [[6], 7], \"expected\": [[6], 7], \"passed\": true}, {\"check\": \"consecutive different alignments\", \"actual\": [[0, 8], 9], \"expected\": [[0, 8], 9], \"passed\": true}, {\"check\": \"zero-size aligned reservation\", \"actual\": [[8], 8], \"expected\": [[8], 8], \"passed\": true}, {\"check\": \"no allocation requests\", \"actual\": [[], 1], \"expected\": [[], 1], \"passed\": true}, {\"check\": \"unit alignment adds no padding\", \"actual\": [[1], 2], \"expected\": [[1], 2], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}