fix(unreal): resolve GMalloc in STALKER 2(2.0) UE5.5 - #24
Open
robert-krukau wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a GMalloc pattern for S.T.A.L.K.E.R. 2 Update 2.0 (UE 5.5).
Without this pattern, the existing
GMallocPatternsresolver does not find a match and resolution falls back toGMallocString.For this game, the string-based resolver produces a false positive from a
mov rcx, [rip+...] / test rcx, rcxsequence and resolves a non-FMalloc global.Failure
Using the incorrectly resolved object as
GMalloccaused:FMalloc::QuantizeSize(0x60, 0)to return1TSet::EmplaceduringTypeChecker::store_all_object_typesVerification
The actual GMalloc global was traced through an allocator call path.
Its QuantizeSize implementation was verified to return
0x60for a requested allocation size of0x60.The added signature uniquely matched the relevant code sequence in the tested S.T.A.L.K.E.R. 2 executable and resolves the correct GMalloc global.
As a control test, replacing the false-positive GMalloc result with this global allowed RE-UE4SS initialization to complete successfully.
The same result was then confirmed with the new pattern built into patternsleuth: S.T.A.L.K.E.R. 2 reached the main menu without the previous fatal error, and UE4SS functionality was operational.
Tested with S.T.A.L.K.E.R. 2 Update 2.0 / UE 5.5.