<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clang-cl on ARM should generate __security_push_cookie / __security_pop_cookie instead of __stack_chk_guard / __stack_chk_fail"
   href="https://bugs.llvm.org/show_bug.cgi?id=41115">41115</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-cl on ARM should generate __security_push_cookie / __security_pop_cookie instead of __stack_chk_guard / __stack_chk_fail
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>LLVM Codegen
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nicolasweber@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>From
<a href="https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/porting-putty-to-windows-on-arm">https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/porting-putty-to-windows-on-arm</a>
:

"""
 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?)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>