How to enable MALLOC_PROTECT_BEFORE in Xcode?
- by Daniel S.
After switching on some debug options in Xcode, it now tells me the following in the output:
GuardMalloc[Roadcast-4010]: free: magic is 0x0000090b, not 0xdeadbeef.
GuardMalloc[Roadcast-4010]: free: header magic value at 0x43f49bf0, for block 0x43f49c00-0x43f50000, has been trashed by a buffer underrun.
GuardMalloc[Roadcast-4010]: Try running with MALLOC_PROTECT_BEFORE to catch this error immediately as it happens.
How do I switch on MALLOC_PROTECT_BEFORE?