Files
PS5_RetroArch/tests/test_menu_memory.py
T
Mihawk 7ae0396514 Fix XMB large-list allocation failures and preserve normal logging
Use compact XMB nodes and reclaimable mapped slabs for nodes/callbacks. Check list construction and copy failures, stop failed population, and rebuild consumers when patched headers change.

Verified both diagnostic and normal builds with all five tools/verify.sh gates, 71 tests, and 278 frontend sources. Owner confirms crash-free navigation and normal build resolves periodic hitches; existing logging retained.

Evidence: evidence/xmb-safe-list-run/{capture,expectation,diagnostic-build,normal-build}.json. Replay: bash tools/verify.sh format evidence. Accepted normal identity: 2d0743abbcf289efd0a549929d25ce7512968fc93cba8163467fdd3641c8fcf6.
2026-09-19 20:25:47 -04:00

20 lines
973 B
Python

"""Large menu objects stay off libc; mappings are reclaimed and failures preserve ownership."""
from pathlib import Path
import os
import subprocess
import tempfile
import unittest
ROOT = Path(__file__).resolve().parent.parent
class MenuMemory(unittest.TestCase):
def test_large_lists_failure_realloc_and_concurrent_release(self):
with tempfile.TemporaryDirectory() as directory:
binary = Path(directory) / 'menu-memory'
subprocess.run(['c++', '-std=c++17', '-pthread', '-I.', '-g',
'-fsanitize=address,undefined', '-Wl,--wrap=mmap',
'-Wl,--wrap=munmap', 'tests/menu_memory_test.cpp',
'src/memory_ps5.cpp', '-o', str(binary)], cwd=ROOT, check=True)
subprocess.run([str(binary)], check=True,
env={**os.environ, 'ASAN_OPTIONS': 'detect_leaks=0',
'UBSAN_OPTIONS': 'halt_on_error=1'})