<div dir="ltr">When I build the attached C program in windows, using Clang built from a very recent tree version (trunk 256686), Clang fails to detect the trivial double free, as evidenced in the resulting plist file (attached).<div><br></div><div>What's going on here? I have a gut feeling that it has something to do with Clang's ignorance of SAL, which allows MSVC to detect the condition generically:</div><div><br></div><div><pre style="font-family:Consolas;color:gainsboro;background:rgb(30,30,30)"><span style="color:rgb(86,156,214)">void</span> <span style="color:rgb(86,156,214)">__cdecl</span> <span style="color:rgb(200,200,200)">free</span><span style="color:rgb(180,180,180)">(</span>
    <span style="color:rgb(189,99,197)">_Pre_maybenull_</span> <span style="color:rgb(189,99,197)">_Post_invalid_</span> <span style="color:rgb(86,156,214)">void</span><span style="color:rgb(180,180,180)">*</span> _Block
    <span style="color:rgb(180,180,180)">);</span>
</pre></div><div>(from C:/Program Files (x86)/Windows Kits/10/Include/10.0.10240.0/ucrt/corecrt_malloc.h)</div><div><br></div><div>I'm also attaching the verbose compilation output.</div><div><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><span style="font-size:12.8px"><br></span></div><div dir="ltr"><span style="font-size:12.8px">Sincerely,</span><br style="font-size:12.8px"><span style="font-size:12.8px">Alexander Riccio</span><br style="font-size:12.8px"><span style="font-size:12.8px">--</span><br style="font-size:12.8px"><span style="font-size:12.8px">"Change the world or go home."</span><div style="font-size:12.8px"><a href="http://about.me/ariccio" target="_blank">about.me/ariccio</a></div><div style="font-size:12.8px"><a href="http://about.me/ariccio" target="_blank"><br></a></div><div style="font-size:12.8px">If left to my own devices, I will build more.</div><div style="font-size:12.8px">⁂</div></div></div></div></div></div>
</div></div>