Repository navigation
Conversation
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
DepthSurfaceReuse.cpp replaces operator new and delete in the graphics test binary on glibc, but not the nothrow new. libstdc++ takes the temporary buffer of std::stable_sort from the nothrow new and returns it through the sized delete, so in an ASan build PlanVertexCopies stops on an alloc-dealloc-mismatch (operator new vs free). The nothrow new now goes through the replaced one, as ShaderMemory.cpp does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Windows check of head Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2.0 UCRT r7, Release, with Vulkan hidden.
The 45 testsagc_address_copy_cap, agc_address_copy_cap_mirror, agc_address_copy_cap_remembered, agc_address_space_unwatched_mirror_import, agc_command_batch_fence_failure, agc_compute_descriptor_layout_flags, agc_copy_input_kept_bytes, agc_depth_copy_kept_bytes, agc_descriptor_cache, agc_descriptor_pool_reset_failure, agc_driver_address_space_teardown, agc_driver_alpha_to_coverage_state, agc_driver_covered_centroid_state, agc_driver_depth_bounds_state, agc_driver_fault_only_template_records, agc_driver_fault_only_template_records_kept, agc_driver_fault_only_template_records_loop_guard, agc_driver_fault_only_template_records_loop_guard_kept, agc_driver_linear_volume_nonresident, agc_driver_msaa_dcc_state, agc_driver_sample_location_grid_fallback, agc_driver_sample_order_planning, agc_driver_undithered_alpha_to_coverage_state, agc_driver_unobserved_provoking_vertex, agc_driver_unused_viewport_depth, agc_graphics_profile_draw, agc_heap_mirror_reference_size, agc_heap_mirror_run_unwatch, agc_heap_mirror_run_unwatch_no_space_cache, agc_heap_mirror_unwatch, agc_heap_mirror_unwatch_no_space_cache, agc_pipeline_journal, agc_pipeline_journal_extended_paths, agc_pipeline_journal_long_paths, agc_pipeline_library_clear_waits_for_build, agc_pipeline_store_fixed_bound, agc_pipeline_store_growth, agc_pipeline_store_lazy_buffer_pool, agc_pipeline_store_replay_growth, agc_pipeline_store_touch, agc_sparse_buffer_holes, agc_sparse_heap_mirror_budget, agc_sparse_heap_mirror_unwatch, agc_sparse_heap_mirror_unwatch_no_space_cache, guest_font_graphics AI-assisted: yes. |
Based on #17680 by StepFPV. Co-Authored-By: StepFPV <StepFPV@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
Since the 2026-11-07 run (#9675 merged after the 2026-11-06 one) the Sanitizers nightly stops
agc_driver_graphics,agc_driver_graphics_maps_fallbackandagc_graphics_profile_draw(all three runagc_driver_graphics_tests) after about 3 s, before any sanitizer gets a say; the failures are tracked in #16813, where my 2026-11-09 comment has the first root cause. Two test-only changes are needed for the binary to run through in an ASan build; the second one only shows once the first is in.The PS4 color slices sit above 40 bits in an ASan build.
gcnColorSliceTests(added by #9675) takes its three slices fromGuestHeapAlignForGpuand requires the block to sit below 2^40, the limit of the GCNCB_COLOR0_BASEregister it programs. In an ASan build every guest allocation lives above that:GuestArena::GuestAddressOffsetmoves the arena to0x100000000000so it clears ASan's shadow gap (GuestArena.hpp:16, since #7866), and the PS4 decode has only the 32 bits of0x318shifted by 8 (State.cpp:2220), unlike the PS5 decode, which takes the high bits from0x390(State.cpp:2347). The test stops onAGC graphics: guest heap memory is beyond the 40-bit PS4 GPU address space. In a Linux ASan build it now maps its 48 KiB itself withMAP_FIXED_NOREPLACE, starting at0x60000000below ASan's low shadow and stepping by 4 GiB as #16020 proposes forGcnColorTarget.cpp, and unmaps it afterwards. The decode reads that memory through the driver's page check, so it has to be real, readable memory, not just an address. Every other build keeps the guest heap block.The replaced
operator newhas no nothrow form. #17007 added a glibc-onlyoperator newandoperator deletetoDepthSurfaceReuse.cpp, which is linked into the same binary, to count allocations. It did not replaceoperator new(std::size_t, const std::nothrow_t&). libstdc++ takes the temporary buffer ofstd::stable_sortfrom the nothrow new and gives it back through the sized delete, so with the first change in, the binary stops a few tests later inPlanVertexCopies(VertexInput.hpp:355, fromvertexCopyTests):The nothrow new now goes through the replaced one, the same way
ShaderMemory.cppdoes.Tested
Ubuntu 26.04 container with the Sanitizers workflow's flags (GCC 15.2.0,
-DANYPS5_ENABLE_ASAN=ON,-g1 -fsanitize=undefined -fno-sanitize=vptr,ASAN_OPTIONS=detect_leaks=0,UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1),agc_driver_graphics_testsonmain0dd2fffe35:main: the three tests fail in about 3.3 s on the 40-bit message.alloc-dealloc-mismatchabove.agc_graphics_profile_draw55.9 s,agc_driver_graphics58.2 s andagc_driver_graphics_maps_fallback58.3 s pass, with no sanitizer output.Windows 11, WinLibs GCC 15.2.0 UCRT, Release, RTX 4080 SUPER:
agc_graphics_profile_drawandagc_driver_graphicspass with both commits on0dd2fffe35(13.0 s and 12.5 s), as they did onmain990481cdbf(18.8 s and 18.3 s). The second commit is inside#ifdef __GLIBC__, so Windows does not compile it.tools/check_conventions.py --base upstream/mainpasses.Not tested on macOS, where
GuestAddressOffsetis 0 and neither path changes.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code