mirror of
https://github.com/mihawk-99/PS5_RetroArch.git
synced 2026-10-18 23:09:29 -05:00
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.
20 lines
973 B
Python
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'})
|