facebook / infer

A static analyzer for Java, C, C++, and Objective-C
http://fbinfer.com/
MIT License
14.79k stars 2k forks source link

`--biabduction-unsafe-malloc` doesn't assume that `calloc()` and `realloc()` never return null #1799

Open apaz-cli opened 7 months ago

apaz-cli commented 7 months ago

When projects make the assumption that malloc() never returns null (as is the default on popular operating systems), they typically also make the same assumptions for calloc() and realloc(). Am I blind and I just need to read the docs, or does a solution for this exist?

Joao-Peterson commented 7 months ago

my question exactly!