D88631 introduced a set of knobs to tweak how the stack protector is codegen'd for x86 targets, including the offset from the base register where the stack cookie is located. The StackProtectorGuardOffset field in TargetOptions was left uninitialized instead of being reset to its neutral value -1, making it possible to emit nonsensical code if the frontend doesn't change the field value at all before feeding the TargetOptions to the target machine initializer.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/Target/TargetOptions.h | ||
---|---|---|
335 | Is the cast necessary? |
llvm/include/llvm/Target/TargetOptions.h | ||
---|---|---|
335 | Not really, unless -Wsign-conversion or equivalent options are passed. |
llvm/include/llvm/Target/TargetOptions.h | ||
---|---|---|
335 | Use -1U? |
llvm/include/llvm/Target/TargetOptions.h | ||
---|---|---|
335 | Good call, thanks. |
llvm/include/llvm/Target/TargetOptions.h | ||
---|---|---|
335 | Does it duplicated with |
Is the cast necessary?