pub struct Guard {
pub segment: Segment,
pub at: i32,
pub fail: &'static str,
}Expand description
Where a target keeps the word a stack protector’s canary is a copy of.
Not a register and not a symbol either, on the conventions here. The word is in the block a
thread has to itself, which is reached through a segment register and no other way, so the only
way to name it is a distance into that block. That is why %fs:40 appears in every protected
function glibc has ever linked and why no object file carries a relocation for it.
A convention that answers None is one this compiler has no protector for, and a command line
that asks for one on such a target is told so rather than quietly given an unprotected frame.
Fields§
§segment: SegmentThe storage the word is in.
at: i32How far into it the word is.
fail: &'static strThe function called when the copy in the frame no longer matches it, which does not come back.