Summary
In UE 5.8, dynamic loading of certain third-party or custom native DLLs causes an immediate Access Violation (read of invalid address) inside FBacktracer::AddModule().
This is a regression introduced in UE 5.8 in Engine/Source/Runtime/Core/Private/ProfilingDebugging/Microsoft/WindowsCallstackTrace.cpp line ~396. The code added handling for UNW_FLAG_CHAININFO via a while loop, but it executes prior to verifying UnwindInfo->Version and dereferences chain pointers without verifying bounds or handling PE redirection flags (e.g. bit 0 redirection). In UE 5.7, this loop did not exist and the version check guarded access, preventing any crash.
What Type of Bug are you experiencing?
Platform Other
Steps to Reproduce
In a UE 5.8 project, load a dynamic DLL (built with /INCREMENTAL:YES or containing chained function table entries) via FPlatformProcess::GetDllHandle() from any path not filtered by CallstackTrace_FilterModule() (e.g. outside engine binaries directory).
Ensure CallstackTrace / Trace is active (default in Editor builds).
The editor crashes with an Access Violation at WindowsCallstackTrace.cpp:396.
Expected Result
no crash
Observed Result
crash
Affects Versions
5.8
Platform(s)
Windows
For crash reports, include your callstack
UnrealEditor-Core.dll!FBacktracer::AddModule(unsigned __int64 ModuleBase=…, const wchar_t * Name=…) Line 396
UnrealEditor-Core.dll!CallstackTrace_AddModule(…) Line 512
UnrealEditor-Core.dll!CallstackTrace_DllNotification(…) Line 562
ntdll.dll!LdrpCallInitRoutine()
ntdll.dll!LdrpInitializeProcess()
KernelBase.dll!LoadLibraryExW()
Additional Notes
Unreal Engine 5.8 (Worked in UE 5.7)
Suggested Fix:
Validate module boundary limits and verify UnwindInfo->Version == 1 prior to/during chain traversal in Engine/Source/Runtime/Core/Private/ProfilingDebugging/Microsoft/WindowsCallstackTrace.cpp