<div dir="ltr">+ Devin and Kuba from Apple, who may have iOS-specific knowledge. <div><br></div><div>We've recently made several changes that make asan consume less memory, but</div><div>* these changes are not yet in Xcode 9 (I assume)</div><div>* I am not 100% sure these changes affect iOS (we tested only on Linux, Kuba has recently applied related patches for Mac)</div><div>* Your problem might be caused by something else</div><div><br></div><div>Typically the biggest source of memory consumption is quarantine and the stack trace storage (stack_depot).</div><div>If you are able to set ASAN_OPTIONS env var, please try this: </div><div>ASAN_OPTIONS=quarantine_size_mb=1:malloc_context_size=5<br></div><div><br></div><div>quarantine_size_mb=1 limits the quarantine size (and thus reduces the ability to find use-after-free)<br></div><div>malloc_context_size=5 reduces the length of stack traces that asan stores for future bug reporting <br></div><div><br></div><div>If these don't help, we'll need more details (e.g. the iOS's analog of /proc/PID/maps for the process at the time of failure)</div><div><br></div><div>--kcc </div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 7, 2017 at 12:56 PM, Michael Eisel via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>I'm working on an iPhone app that rarely runs out of memory normally, but with the address sanitizer on will crash after a couple minutes. I don't remember it crashing this much with Xcode 8's version of clang, but in any case I'm using Xcode 9 now. Although crashing after a couple minutes is fine for testing during development, I would like to distribute the app to internal testers with asan built into it, and I don't want to impact their experience so much. Is there any simple way to reduce memory use, e.g. by turning off some component of asan?</div><div><br></div><div>Thanks,</div><div>Michael</div></div>
<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>