ASAN: Unable to find a memory range after restricting VM on IOS

140 views
Skip to first unread message

Rodrigo Mantini

unread,
Oct 1, 2020, 10:23:04 AM10/1/20
to address-sanitizer

Hello, I'm trying to use ASAN on an IOS app but I get the mentioned error.
I would like to know if there is anything at all that I can do to make it work.
I know that app links to a lot of shared libraries and I think that might be issue, but if that is the case I don't know how can I debug it to see if there is specific library that is using the memory space required by ASAN.

Here is the output with verbosity=3:
==43926==AddressSanitizer: libc interceptors initialized

==43926==FindDynamicShadowStart, space_size = 0x00005b003fff

==43926==Shadow doesn't fit, largest_gap_found = 0x000057fe0000, max_occupied_addr = 0x000280000000

==43926==FindDynamicShadowStart, space_size = 0x000057fe3fff

==43926==Unable to find a memory range after restricting VM.

==43926==AddressSanitizer CHECK failed: /AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/clang_compiler_rt/clang-1200.0.32.2/compiler-rt/lib/asan/asan_mac.cpp:92 "((0 && "cannot place shadow after restricting vm")) != (0)" (0x0, 0x0)

Thank you,
Rodrigo

Dan Liew

unread,
Oct 1, 2020, 2:54:54 PM10/1/20
to address-...@googlegroups.com
Hi Rodrigo,

It looks like you might be hitting an issue that we are currently tracking internally inside Apple.

We have a hypothesis on the cause problem but we currently don't have a reproducer. Can you share a reproducer with us? Having a reproducer would allow us to confirm our hypothesis and come up with a fix.

Until a fix is landed your only options to workaround this are one of the following:

* Test your app in the iOS simulator
* Load fewer shared libraries at process start up time
* Use an iOS device with a large amount of RAM

Thanks,
Dan.

--
You received this message because you are subscribed to the Google Groups "address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to address-saniti...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/address-sanitizer/e2b05c00-c47e-46b1-af75-ebe6328d836fn%40googlegroups.com.

Rodrigo Mantini

unread,
Oct 2, 2020, 1:08:40 PM10/2/20
to address-sanitizer
Hi Dan,
Thanks a lot. Unfortunately I cannot shared the reproducer as it is because there is a lot of proprietary code involved. I'll try to reduce it as much as I can to see if I can get something sharable.
In mean while, I'd up to run tests if you need any kind of data.
Thanks,
Rodrigo
Reply all
Reply to author
Forward
0 new messages