mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-23 09:40:29 +01:00
u_trace: Fix payload refcounting in u_trace_clone_append().
If the clone_append was to a chunk of the same u_trace that gets
process_chunk()ed after where we're cloning from, then the payloads would
have been unreffed in the previous chunk's cleanup_chunk().
Fixes use-after-frees with turnip gmem rendering that resulted in
corrupted payloads.
Fixes: 14e45cb21e ("util/u_trace: refcount payloads")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35379>
This commit is contained in:
parent
bc2edf14d8
commit
6e97df1d76
1 changed files with 1 additions and 1 deletions
|
|
@ -898,7 +898,7 @@ u_trace_clone_append(struct u_trace_iterator begin_it,
|
|||
to_copy * sizeof(struct u_trace_event));
|
||||
|
||||
/* Take a refcount on payloads from from_chunk if needed. */
|
||||
if (begin_it.ut != into) {
|
||||
if (from_chunk != to_chunk) {
|
||||
struct u_trace_payload_buf **in_payload;
|
||||
u_vector_foreach (in_payload, &from_chunk->payloads) {
|
||||
struct u_trace_payload_buf **out_payload =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue