<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Oct 10, 2020 at 11:21 PM 罗勇刚(Yonggang Luo) via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">But I don't know how to implement<div>__GSHandlerCheck</div><div>__security_check_cookie<br clear="all"><div>__security_cookie<br></div><div><br></div><div>when using msvc to compiling debug code.</div><div><br></div><div>Who knows how to implement these three functions or possible alternatives.</div></div></div></blockquote><div><br></div><div>How fortunately I've been passing by and stumbled upon this thread. Here is my implementation:</div><div><br></div><div>uintptr_t __security_cookie = 0xAABBCCDD;<br><br>void __fastcall __security_check_cookie(uintptr_t cookie)<br>{<br> if (cookie != __security_cookie)<br> __debugbreak();<br>}</div><br>
</div></div>