balazske wrote:

> * a [straightforward leak of a string returned by 
> `strdup()`](https://codechecker-demo.eastus.cloudapp.azure.com/Default/report-detail?run=postgres_REL_13_0_modelposix_defaulton&newcheck=postgres_REL_13_0_modelposix_defaultoff&is-unique=on&diff-type=New&report-id=3467892&report-hash=9278b17f14a2612356e847d5ef5426a0&report-filepath=%2aexec.c)
>  is lost and I don't know why. Perhaps turn this into an unit test to examine 
> what happens?

This may happen because the "controlled environment" analyzer option may be set 
to `true` (but I did not check it). Without `ModelPOSIX` the `getenv` call can 
fail or not (it is not modeled), but with `ModelPOSIX` it is modeled by the 
checker and it is assumed that it can not fail (environment variable exists 
always). In this case the branch with `strdup` is not executed at all.

https://github.com/llvm/llvm-project/pull/80457
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to