6

Getting this error when trying to build iOS app with Address Sanitizers enabled

==3850==ERROR: AddressSanitizer failed to allocate 0xffffffffff9fc000 (-6307840) bytes at address 2db624000 (errno: 22)
==3850==ReserveShadowMemoryRange failed while trying to map 0xffffffffff9fc000 bytes. Perhaps you're using ulimit -v

How to resolve this and what is ulimit -v

Tim Sylvester
  • 22,897
  • 2
  • 80
  • 94
arihant jain
  • 115
  • 1
  • 8
  • 1
    Debugging this completely depends on your code. Generally address sanitizer errors at are runtime, so you'll need to look for what leads to this happening, or you'll need to keep simplifying your code until you find the issue. Keep removing parts of your program until the error goes away. The last thing you removed will contain the problem. `ulimit -v` means that virtual memory is intentionally limited in your process space. If you're not familiar with how that's done, it is very unlikely that this is relevant. – Rob Napier Oct 29 '20 at 18:16
  • 1
    `ulimit` is a way to keep individual users from using up too much of a shared resource. In this case, the fundamental problem is that the number of bytes to allocate was a negative number (-6307840) which was cast to unsigned causing it to wrap around to an extremely huge positive number (~18 billion GB). – Tim Sylvester Nov 11 '20 at 17:45

0 Answers0