Browse Questions
  • Secure Message is a stateless asymmetric primitive that encrypts or signs a single payload using your private key and the peer's public key, making it a natural fit for request/response APIs.
  • Address Sanitizer (ASan) is a runtime tool that detects memory corruption bugs — buffer overflows, use-after-free, and invalid memory access — that would otherwise cause mysterious crashes.
  • VStack renders all its children immediately.
  • The responder chain is a sequence of UIResponder objects that can handle events (touches, key presses, actions).

Answer: Address Sanitizer (ASan) is a runtime tool that detects memory corruption bugs — buffer overflows, use-after-free, and invalid memory access — that would otherwise cause mysterious crashes.

How to enable:

  1. Edit Scheme → Run → Diagnostics
  2. Enable Address Sanitizer
  3. Optionally enable Undefined Behavior Sanitizer too

What it catches:

  • Buffer overflow (reading/writing past array bounds)
  • Use-after-free (accessing deallocated memory)
  • Use-after-return (returning pointer to stack variable)
  • Double-free

Example output:

==ERROR: AddressSanitizer: heap-buffer-overflow
READ of size 4 at 0x... thread T0
    #0 MyApp in processData() MyClass.swift:47

Note: ASan adds significant runtime overhead (~2x slower, ~3x more memory) — only enable it when hunting bugs, not for regular development.