facebook / facebook/infer

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

Open
#138 5 comments 0 reactions 1 assignee Claimed by @dulmarod View on GitHub
c false-positive stale
Dominant language
OCaml
Stars
15.7k
Forks
2.1k
Avg merge
19h 36m
Merged PRs (30d)
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.