# Porting MallocBinned2 to iOS crash when startup in shipping build 

**URL:** <https://forums.unrealengine.com/t/porting-mallocbinned2-to-ios-crash-when-startup-in-shipping-build/2383533>\
**Category:** Mobile\
**Tags:** unreal-engine, crash, CPP\
**Created:** [March 10, 2025, 2:58pm UTC](https://forums.unrealengine.com/t/porting-mallocbinned2-to-ios-crash-when-startup-in-shipping-build/2383533 "2025-03-10T14:58:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SpaceTan.Tencent](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SpaceTan.Tencent](https://forums.unrealengine.com/u/SpaceTan.Tencent)\
**Post date:** [March 10, 2025, 2:58pm UTC](https://forums.unrealengine.com/t/porting-mallocbinned2-to-ios-crash-when-startup-in-shipping-build/2383533/1 "2025-03-10T14:58:38Z")

</div>

I’ve been trying to port FMallocBinned2 support to iOS and encountered an issue:  
The test build passes, but the shipping build crashes on startup. The logs show CanaryTest failures during MB2 Free and Realloc operations.

Since this modification is very low-level and only occurs in shipping builds, I’m unsure how to proceed. Could the community please help?

**My process:**  
I only ported code related to the ApplePlatformMemory and IOSPlatformMisc modules, without touching MB2 itself (mainly because checking MallocBinned2.cpp’s git history didn’t reveal strongly related changes).

**Engine version:** 4.24  
**Environment:** iOS shipping build  
**Issue:** Crash on startup.

 ![7e9a15bb6e58d8c0bcf44a99ea145ed](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/d/a/cda2b4c7c3884f7ff5f3c5308c086a9a8d0b361d.png)
