patches: lsteamclient: refresh ReleaseRequest tracking for upstream's magic check

Upstream ca9e1047 now validates ISteamMatchmaking request handles with a
magic number and allocates them with calloc(). Regenerate 0018 against
it so it applies without fuzz; the patched result is unchanged.

The tracking is still needed on top of the magic check: two threads
releasing the same request at once can both pass the magic check before
either frees it, while only one can remove it from the locked list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
GloriousEggrollandClaude Opus 5.5 committed 2026-11-02 22:12:48 -07:00
1 parent b6a0a23d8c
commit c415c2ffb3
1 file changed
+19 -27
@@ -17,16 +17,11 @@ Track live requests and ignore releases of requests that are not live.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
---
lsteamclient/steam_matchmaking_manual.c | 71 +++++++++++++++++++++++++
1 file changed, 71 insertions(+)
diff --git a/lsteamclient/steam_matchmaking_manual.c b/lsteamclient/steam_matchmaking_manual.c
index 491c6264..fd13038a 100644
--- a/lsteamclient/steam_matchmaking_manual.c
+++ b/lsteamclient/steam_matchmaking_manual.c
@@ -2,6 +2,51 @@
WINE_DEFAULT_DEBUG_CHANNEL(steamclient);
@@ -28,6 +28,51 @@
return NULL;
}
+/* Some games (e.g. The Forest) call ReleaseRequest more than once on the same
+ * server list request handle, sometimes from different threads. This is
@@ -76,7 +71,7 @@ index 491c6264..fd13038a 100644
void __thiscall winISteamMatchmakingServers_SteamMatchMakingServers001_CancelQuery(struct w_iface *_this, uint32_t eType)
{
struct ISteamMatchmakingServers_SteamMatchMakingServers001_CancelQuery_params params =
@@ -38,6 +83,7 @@ void * __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_Request
@@ -63,6 +108,7 @@
return NULL;
}
@@ -84,7 +79,7 @@ index 491c6264..fd13038a 100644
return request;
}
@@ -63,6 +109,7 @@ void * __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_Request
@@ -86,6 +132,7 @@
return NULL;
}
@@ -92,7 +87,7 @@ index 491c6264..fd13038a 100644
return request;
}
@@ -90,6 +137,7 @@ void * __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_Request
@@ -112,6 +159,7 @@
return NULL;
}
@@ -100,7 +95,7 @@ index 491c6264..fd13038a 100644
return request;
}
@@ -117,6 +165,7 @@ void * __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_Request
@@ -138,6 +186,7 @@
return NULL;
}
@@ -108,7 +103,7 @@ index 491c6264..fd13038a 100644
return request;
}
@@ -144,6 +193,7 @@ void * __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_Request
@@ -164,6 +213,7 @@
return NULL;
}
@@ -116,7 +111,7 @@ index 491c6264..fd13038a 100644
return request;
}
@@ -171,6 +221,7 @@ void * __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_Request
@@ -190,6 +240,7 @@
return NULL;
}
@@ -124,8 +119,8 @@ index 491c6264..fd13038a 100644
return request;
}
@@ -196,6 +247,13 @@ void __thiscall winISteamMatchmakingServers_SteamMatchMakingServers002_ReleaseRe
struct w_request *request = hServerListRequest;
@@ -215,6 +266,13 @@
struct w_request *request = get_w_request( hServerListRequest );
TRACE( "%p %p\n", _this, hServerListRequest );
+
@@ -138,7 +133,7 @@ index 491c6264..fd13038a 100644
execute_pending_callbacks(); /* execute any pending callbacks that might still need to use the request */
STEAMCLIENT_CALL( ISteamMatchmakingServers_SteamMatchMakingServers002_ReleaseRequest, &params );
@@ -271,6 +329,7 @@ void * __thiscall winISteamMatchmakingServers_SteamMatchMakingServers003_Request
@@ -288,6 +346,7 @@
return NULL;
}
@@ -146,7 +141,7 @@ index 491c6264..fd13038a 100644
return request;
}
@@ -296,6 +355,7 @@ void * __thiscall winISteamMatchmakingServers_SteamMatchMakingServers003_Request
@@ -312,6 +371,7 @@
return NULL;
}
@@ -154,7 +149,7 @@ index 491c6264..fd13038a 100644
return request;
}
@@ -323,6 +383,7 @@ void * __thiscall winISteamMatchmakingServers_SteamMatchMakingServers003_Request
@@ -338,6 +398,7 @@
return NULL;
}
@@ -162,7 +157,7 @@ index 491c6264..fd13038a 100644
return request;
}
@@ -350,6 +411,7 @@ void * __thiscall winISteamMatchmakingServers_SteamMatchMakingServers003_Request
@@ -364,6 +425,7 @@
return NULL;
}
@@ -170,7 +165,7 @@ index 491c6264..fd13038a 100644
return request;
}
@@ -377,6 +439,7 @@ void * __thiscall winISteamMatchmakingServers_SteamMatchMakingServers003_Request
@@ -390,6 +452,7 @@
return NULL;
}
@@ -178,7 +173,7 @@ index 491c6264..fd13038a 100644
return request;
}
@@ -404,6 +467,7 @@ void * __thiscall winISteamMatchmakingServers_SteamMatchMakingServers003_Request
@@ -416,6 +479,7 @@
return NULL;
}
@@ -186,8 +181,8 @@ index 491c6264..fd13038a 100644
return request;
}
@@ -429,6 +493,13 @@ void __thiscall winISteamMatchmakingServers_SteamMatchMakingServers003_ReleaseRe
struct w_request *request = hServerListRequest;
@@ -441,6 +505,13 @@
struct w_request *request = get_w_request( hServerListRequest );
TRACE( "%p %p\n", _this, hServerListRequest );
+
@@ -200,6 +195,3 @@ index 491c6264..fd13038a 100644
execute_pending_callbacks(); /* execute any pending callbacks that might still need to use the request */
STEAMCLIENT_CALL( ISteamMatchmakingServers_SteamMatchMakingServers003_ReleaseRequest, &params );
--
2.56.0