Files
UnrealEngineUWP/Engine/Source/Runtime/Core
michael sartain 6f95a3686b Use _NSGetArgc / _NSGetArgv in FMacPlatformMemory::BaseAllocator
These functions don't allocate memory like "NSArray *Args = [[NSProcessInfo processInfo] arguments];" does.

This fixes initialization crash in UnrealLightmass:

  * Embree has a global ctor embree::registerRegressionTest which adds to a std::vector which does an operator new.
  * That called FMemory::Malloc and FMacPlatformMemory::BaseAllocator for the first time.
  * BaseAllocator does an allocation here:
     - NSArray *Args = [[NSProcessInfo processInfo] arguments];
  * And now we're in a spot where CFAllocatorAllocate calls malloc_zone_malloc to alloc some memory where:
     - __CFAllocatorCustomMalloc --> CFAllocatorAllocate --> malloc_zone_malloc --> __CFAllocatorCustomMalloc --> rinse, lather, repeat...

And we're in recursive death.

[REVIEW] [at]Will.Damon
[FYI] Juan.Canada
#jira UE-126266
#preflight trivial

#ROBOMERGE-AUTHOR: michael.sartain
#ROBOMERGE-SOURCE: CL 18813604 in //UE5/Release-5.0/... via CL 18813614 via CL 18822764
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18824297 by michael sartain in ue5-main branch]
2022-02-02 07:35:43 -05:00
..
2022-02-01 14:39:50 -05:00