| author | |
| committer | |
| log | 10c2b36444788ae0518dfc8908a4821f4e60ed67 |
| tree | 33e44625653d96bc3dec29fa01160ed9d5f32e1d |
| parent | 4d729ebc87456c9a9e1c487e6185346d1eb8d585 |
The missing initializer for a single field in the TargetOptions class
was enough to turn the stack protectors into hot garbage.
Fixes #84081 files changed, 5 insertions(+), 0 deletions(-)
src/zig_llvm.cpp+5| ... | ... | @@ -153,6 +153,11 @@ LLVMTargetMachineRef ZigLLVMCreateTargetMachine(LLVMTargetRef T, const char *Tri |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | TargetOptions opt; |
| 156 | ||
| 157 | // Work around the missing initialization of this field in the default | |
| 158 | // constructor. Use -1 so that the default value is used. | |
| 159 | opt.StackProtectorGuardOffset = (unsigned)-1; | |
| 160 | ||
| 156 | 161 | opt.FunctionSections = function_sections; |
| 157 | 162 | switch (float_abi) { |
| 158 | 163 | case ZigLLVMABITypeDefault: |