Files
UnrealEngineUWP/Engine/Source/Runtime/CoreUObject
kevin macaulayvacher 4897f8726b - Separates FFrame::ReadObject and FFrame::ReadProperty to rely on a new method, FFrame::ReadPointer(), which returns a bare ScriptPointerType.
- Changed codepaths reading FProperty objects using ReadObject() to now use ReadPropertyUnchecked(), since FProperty is not a child of UObject (ReadObject was also an unchecked implementation so validation has been lost).

These changes allow ReadObject to return a UObject fetched from a constructed TObjectPtr<UObject> which enables UObject access tracking. This corrects the previous implementation of ReadProperty which would return an FProperty from a temporarily constructed TObjectPtr<UObject>. This had the effect of running TObjectPtr tracking handlers (if any are registered) on the FProperty object which is not actually a UObject type. Using the intermediate TObjectPtr<UObject> in a handler could corrupt the underlying FProperty data as many codepaths in TObjectPtr lazily initialize UObject member variables upon calling UObject methods.

#jira UE-204533
#rb Francis.Hurteau, Robert.Manuszewski

[CL 30924162 by kevin macaulayvacher in ue5-main branch]
2024-01-26 10:27:20 -05:00
..