[cfe-dev] Clang on Windows fails to detect trivial double free in static analysis
<Alexander G. Riccio> via cfe-dev
cfe-dev at lists.llvm.org
Sun Jan 3 22:31:59 PST 2016
Is it because the checker is *unix*.malloc
<http://clang-analyzer.llvm.org/available_checks.html#unix_checkers>? If
so, that's actually quite terrible... why only check it on unix??
Sincerely,
Alexander Riccio
--
"Change the world or go home."
about.me/ariccio
<http://about.me/ariccio>
If left to my own devices, I will build more.
⁂
On Sat, Jan 2, 2016 at 3:57 PM, <Alexander G. Riccio> <test35965 at gmail.com>
wrote:
> 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).
>
> 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:
>
> void __cdecl free(
> _Pre_maybenull_ _Post_invalid_ void* _Block
> );
>
> (from C:/Program Files (x86)/Windows
> Kits/10/Include/10.0.10240.0/ucrt/corecrt_malloc.h)
>
> I'm also attaching the verbose compilation output.
>
> Sincerely,
> Alexander Riccio
> --
> "Change the world or go home."
> about.me/ariccio
>
> <http://about.me/ariccio>
> If left to my own devices, I will build more.
> ⁂
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160104/ca34a4e0/attachment.html>
More information about the cfe-dev
mailing list