Skip to content

fix(unreal): resolve GMalloc in STALKER 2(2.0) UE5.5 - #24

Open
robert-krukau wants to merge 1 commit into
trumank:masterfrom
robert-krukau:fix-stalker2-gmalloc-ue55
Open

fix(unreal): resolve GMalloc in STALKER 2(2.0) UE5.5#24
robert-krukau wants to merge 1 commit into
trumank:masterfrom
robert-krukau:fix-stalker2-gmalloc-ue55

Conversation

@robert-krukau

Copy link
Copy Markdown

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 GMallocPatterns resolver does not find a match and resolution falls back to GMallocString.

For this game, the string-based resolver produces a false positive from a mov rcx, [rip+...] / test rcx, rcx sequence and resolves a non-FMalloc global.

Failure

Using the incorrectly resolved object as GMalloc caused:

  • FMalloc::QuantizeSize(0x60, 0) to return 1
  • an invalid allocation capacity
  • a null allocation
  • an access violation in TSet::Emplace during TypeChecker::store_all_object_types

Verification

The actual GMalloc global was traced through an allocator call path.

Its QuantizeSize implementation was verified to return 0x60 for a requested allocation size of 0x60.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant