# Epic的专家们好，我们这边遇到一例 仅在IOS 18.4上大量出现的，疑似MallocBinned相关的crash 

**URL:** <https://forums.unrealengine.com/t/epic-ios-18-4-mallocbinned-crash/2525668>\
**Category:** 简体中文 (Simplified Chinese)\
**Tags:** unreal-engine, Epic-Pro-Support, question\
**Created:** [April 7, 2025, 1:50am UTC](https://forums.unrealengine.com/t/epic-ios-18-4-mallocbinned-crash/2525668 "2025-04-07T01:50:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [April 7, 2025, 1:50am UTC](https://forums.unrealengine.com/t/epic-ios-18-4-mallocbinned-crash/2525668/1 "2025-04-07T01:50:49Z")

</div>

Epic的专家们好，我们这边遇到一例 仅在IOS 18.4上大量出现的，疑似MallocBinned相关的crash 【后附crash栈截图】，目前判断的直接原因是从mem pool中取出的Pool info已不合法（TableIndex = 0), 怀疑有内存越界覆写。

我们已用ASAN + ANSI的组合大量跑测，未能复现。如果有上层逻辑的越界行为存在，应该能被ASAN捕获，暂时没有更多线索。

用ASAN + Binned 的组合同样跑测则能够复现（但是未触发ASAN错误），且观察到在开了比较多后台应用的时候，更容易触发这个crash。这个crash的另一特征是触发一次crash后则容易在接下来的一段时间高频继续触发，然后再过一段时间又无法触发了。

我们注意到有一些ue官方在MallocBinned上有一些问题修复的提交【后附相关链接】，尤其是关于在IOS 上使用Nano Malloc的相关逻辑。综上我们目前怀疑这个crash和ios系统内存状态高度相关，不知官方是否能提供更多信息。

crash栈截图：

[Image Removed]

[Image Removed]

crash点位代码：

[Image Removed]

官方相关提交：

[https://github.com/EpicGames/UnrealEngine/commit/ed9fa68e850cd658227dce1878e234a7b40b63f2](https://github.com/EpicGames/UnrealEngine/commit/ed9fa68e850cd658227dce1878e234a7b40b63f2)

[https://github.com/EpicGames/UnrealEngine/commit/55c0325532164da6639fef5ad986960700546e57](https://github.com/EpicGames/UnrealEngine/commit/55c0325532164da6639fef5ad986960700546e57)

还有个raw dump file, 文本格式，也一并转发吧，不知道能否解读出更多信息

---

<div class="post-metadata">

**Author:** ![Liu.Wei](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Liu.Wei](https://forums.unrealengine.com/u/Liu.Wei)\
**Post date:** [April 7, 2025, 3:22am UTC](https://forums.unrealengine.com/t/epic-ios-18-4-mallocbinned-crash/2525668/2 "2025-04-07T03:22:47Z")

</div>

Hi,

经过线下的一些讨论和跟苹果工程师的确认，最新的IOS上应该尽量避免使用nano的 malloc。UE5目前不管是Android还是IOS，都已经不在使用mallocbinned了，最新的Android目前应该是用的MallocBinned3， IOS上用的是MallocBinned2。可以考虑参考最新的MallocBinned2的实现，替换现有的MallocBinned，不过需要注意的是，MallocBinned2里没有考虑PtrIsOSMalloc，有可能会造成使用std::string造成的new/delete不匹配的问题，UE5里的workaround可以参考下面的链接，或者参考MallocBinned的实现，在MallocBinned2里也检查PtrIsOSMalloc，这个已经在其他项目里确认起效了。

[https://github.com/EpicGames/UnrealEngine/commit/c82c70d4a5dd3f8c447fb3bf123d5ee447a1ea22](https://github.com/EpicGames/UnrealEngine/commit/c82c70d4a5dd3f8c447fb3bf123d5ee447a1ea22)

---

<div class="post-metadata">

**Author:** ![anonymous-edc](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous-edc](https://forums.unrealengine.com/u/anonymous-edc)\
**Post date:** [April 18, 2025, 12:28pm UTC](https://forums.unrealengine.com/t/epic-ios-18-4-mallocbinned-crash/2525668/3 "2025-04-18T12:28:14Z")

</div>

你好，这个问题有修改思路了吗，我们项目也遇到了类似的崩溃堆栈，尝试不启用nano malloc也没解决

---

<div class="post-metadata">

**Author:** ![Liu.Wei](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Liu.Wei](https://forums.unrealengine.com/u/Liu.Wei)\
**Post date:** [April 24, 2025, 8:05am UTC](https://forums.unrealengine.com/t/epic-ios-18-4-mallocbinned-crash/2525668/4 "2025-04-24T08:05:53Z")

</div>

抱歉，我们这里暂时没有更多信息，最好跟Apple的Engineer沟通一下，如果可能也可以拉上我一起，可能会更快一些。

---

<div class="post-metadata">

**Author:** ![mChen47](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mChen47](https://forums.unrealengine.com/u/mChen47)\
**Post date:** [January 15, 2026, 8:05am UTC](https://forums.unrealengine.com/t/epic-ios-18-4-mallocbinned-crash/2525668/5 "2026-01-15T08:05:34Z")

</div>

这个问题目前有解决吗？我们也遇到了类似的问题

---

<div class="post-metadata">

**Author:** ![hanbim520](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@hanbim520](https://forums.unrealengine.com/u/hanbim520)\
**Post date:** [October 9, 2026, 9:53am UTC](https://forums.unrealengine.com/t/epic-ios-18-4-mallocbinned-crash/2525668/6 "2026-10-09T09:53:25Z")

</div>

[https://zhuanlan.zhihu.com/p/1889829631009485501](https://zhuanlan.zhihu.com/p/1889829631009485501)
