facebook / infer

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

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

Open apaz-cli opened 1 year ago

apaz-cli commented 1 year 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 11 months ago

my question exactly!