[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.1 (rc2) now available
- From: Rena <hyperhacker@...>
- Date: Tue, 16 Jun 2015 11:54:40 -0400
On Tue, Jun 16, 2015 at 10:55 AM, Ignacio Burgueño <iburgueno@gmail.com> wrote:
> FWIW, I tried Facebook's infer [1] with Lua 5.1.3 rc2 and found nothing
> (besides some false positives)
>
> infer -- make linux
>
> Got the following result:
>
> ~~~~
> Starting analysis (Infer version v0.1.0)
> Analysis finished in 38.227430s
>
> 35 files analyzed
>
>
> src/lfunc.c:49: error: NULL_DEREFERENCE
> pointer uv last assigned on line 48 could be null and is dereferenced at
> line 49, column 5
>
> src/lgc.c:206: error: NULL_DEREFERENCE
> pointer o last assigned on line 205 could be null and is dereferenced at
> line 206, column 3
>
> src/lstate.c:108: error: NULL_DEREFERENCE
> pointer ci last assigned on line 105 could be null and is dereferenced at
> line 108, column 3
>
> src/lstate.c:254: error: NULL_DEREFERENCE
> pointer L1 last assigned on line 253 could be null and is dereferenced at
> line 254, column 3
> ~~~~
>
> They are all false positives because Infer does not know that luaM_realloc_
> can't return NULL. (A model of that function can be added, but it implies
> rebuilding Infer, and I'm lazy).
>
>
> Regards,
> Ignacio
Does Infer understand `__attribute__((returns_nonnull))` ? (I think
it's a gcc extension, but it could be hidden behind a macro that only
expands to that on gcc.)
--
Sent from my Game Boy.