facebook / facebook/infer

silly code passing pointer via string causes silly (false) infer error message

Ouverte
#138 5 commentaires 0 réactions 1 personne assignée Réclamée par @dulmarod Voir sur GitHub
c false-positive stale
Langage dominant
OCaml
Étoiles
15.7k
Forks
2.1k
Merge moyen
19 h 36 min
PR mergées (30 j)
13

Description

The code at:

https://gist.github.com/mk270/6d441ca4d609f48c1261

is a simplified version of some code we run; we weren't aware it was passing pointers via strings, and the error message infer gives:

duffmalloc.c:13: error: MEMORY_LEAK
memory dynamically allocated to arena by call to malloc() at line 11, column 13 is not reachable after line 13, column 5

isn't actually right: there's no memory leak, but there is an incredibly risky operation going on, which we wanted to be told about.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.