[llvm-bugs] [Bug 41115] New: clang-cl on ARM should generate __security_push_cookie / __security_pop_cookie instead of __stack_chk_guard / __stack_chk_fail
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Mar 17 12:11:28 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41115
Bug ID: 41115
Summary: clang-cl on ARM should generate __security_push_cookie
/ __security_pop_cookie instead of __stack_chk_guard /
__stack_chk_fail
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: LLVM Codegen
Assignee: unassignedclangbugs at nondot.org
Reporter: nicolasweber at gmx.de
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
From
https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/porting-putty-to-windows-on-arm
:
"""
There was one small wrinkle, which was stack protection. On x86, clang’s stack
protection is compatible with Visual Studio’s C library, but when targeting
Arm, I found that clang emitted references to __stack_chk_guard and
__stack_chk_fail, which are part of a stack protection system that’s not the
same as the one VS uses. The VS-compatible stack protection involves functions
called __security_push_cookie and __security_pop_cookie, and clang doesn’t know
how to generate calls to those. So I had to turn off stack protection (/GS-) on
the command line.
"""
We should fix this.
(The docs don't mention __security_push_cookie being arm-specific; maybe it's a
x-arch new thing?)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190317/4fe82083/attachment.html>
More information about the llvm-bugs
mailing list