diff options
| author | d7ommy <abnalstlll@gmail.com> | 2026-11-25 21:11:56 +0300 |
|---|---|---|
| committer | d7ommy <abnalstlll@gmail.com> | 2026-11-25 22:29:11 +0300 |
| commit | 804f97479f90e04f9f48b1750e6831ea263ae731 (patch) | |
| tree | c76721783166505014a027229cd65898e3400c95 /runtime/test/tiny_game_exit_code_test.cpp | |
| parent | e48ff03744faff2c429a3968166e28893ec4e9a8 (diff) | |
runtime: guard null and invalid sizes in value_write_sink and add unit tests (RT-VALUE-WRITE-SINK-GUARDS-AND-TESTS)
Harden runtime/src/value_write_sink.h:
- Guard arena() against null buffer pointers and non-4/8-byte sizes by immediately returning Landing::refused, preventing null dereference and invalid writes.
- Guard title_pages() against null addresses, null bytes, and zero size by returning false immediately.
- Guard clear_arena() to reject null device pointers.
- Add clear_title_pages() and reset_for_test() to allow clean state resets across tests and teardown.
- Add portable CPU-only CTest unit test runtime/test/value_write_sink_test.cpp verifying initial state, guards, arena and title_pages dispatch, device-matched clearing, and multi-threaded concurrency.
AI-assisted (Claude Code)
Diffstat (limited to 'runtime/test/tiny_game_exit_code_test.cpp')
0 files changed, 0 insertions, 0 deletions