Uninitialized Data: 0xbaddcafe
You might be wondering what the suspicious 0xbbddcafe
at address 0x729084d4
was before the redzone byte got placed over the first byte in the word. It was 0xbaddcafe
. When the KMF_DEADBEEF
flag is set in the cache, allocated but uninitialized memory is filled with the 0xbaddcafe
pattern. When the allocator performs an allocation, it loops across the words of the buffer and verifies that each word contains 0xdeadbeef
, then fills that word with 0xbaddcafe
.
A system can panic with a message such as:
panic[cpu1]/thread=e1979420: BAD TRAP: type=e (Page Fault) rp=ef641e88 addr=baddcafe occurred in module "unix" due to an illegal access to a user address
In this case, the address that caused the fault was 0xbaddcafe
: the panicking thread has accessed some data that was never initialized.