Used in malloc. Verify that the user isn’t writing outside the block provided, preventing corruption of the Heap, during Heap Allocation.
Abstract
Canaries are metadata associated with malloc arenas. If they are corrupted, this is an indication that we have undefined and/or mallicious behavior. It is a warning sign.
Info
Canary in a coal mine
An allusion to caged canaries (birds) that miners would carry down into the mine tunnels with them. If dangerous gases such as carbon monoxide collected in the mine, the gases would kill the canary before killing the miners, thus providing a warning to exit the tunnels immediately1.