Skip to content
Extraits de code Groupes Projets
  • Andy Heffernan's avatar
    9e2a22d8
    HashAllocator: poison freed blocks · 9e2a22d8
    Andy Heffernan a rédigé et Tom Barbette's avatar Tom Barbette a validé
    
    When the Click build is configured with the option
    --enable-hash-allocator-poisoning, this change will cause
    the HashAllocator to write a "poison" byte value to the block being
    returned to a HashAllocator pool.  This ensures that when a stale
    reference to a freed block is followed, the code will be much less likely
    to interpret the block as a valid object or struct.  In particular,
    pointer values will be non-NULL but bad, leading to immediate failure
    with a clear signature indicating the presence of a stale reference bug.
    
    Signed-off-by: default avatarAndy Heffernan <ahh@meraki.com>
    9e2a22d8
    Historique
    HashAllocator: poison freed blocks
    Andy Heffernan a rédigé et Tom Barbette's avatar Tom Barbette a validé
    
    When the Click build is configured with the option
    --enable-hash-allocator-poisoning, this change will cause
    the HashAllocator to write a "poison" byte value to the block being
    returned to a HashAllocator pool.  This ensures that when a stale
    reference to a freed block is followed, the code will be much less likely
    to interpret the block as a valid object or struct.  In particular,
    pointer values will be non-NULL but bad, leading to immediate failure
    with a clear signature indicating the presence of a stale reference bug.
    
    Signed-off-by: default avatarAndy Heffernan <ahh@meraki.com>