Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Frama-c-discuss] accessing uninitialized left-value



Hello,


2018-08-12 9:37 GMT+02:00 谢文龙 <wlxie2000 at 163.com>:

> Hi
> I started to analysis the libmodbus from the open-source-case-study from
> git. There is a accessing uninitialized left-value warning for line 574 of
> src/modbus-tcp.c
> ai_hints.ai_flags |= AI_PASSIVE;
>
> And I define it as:
> #define AI_PASSIVE 0x0001
> or add -slevel 500
>

The problem is not AI_PASSIVE, but ai_hints.ai_flags. Remember that the
instruction is a shortcut to ai_hints.ai_flags = ai_hints.ai_flags |
AI_PASSIVE; if ai_hints.ai_flags has
not been initialized priori to this instruction, this is an issue. You
should check where ai_hints is declared and whether there is indeed a
possibility that its ai_flags field has not been initialized.

Best regards,
-- 
E tutto per oggi, a la prossima volta
Virgile
-------------- section suivante --------------
Une pièce jointe HTML a été nettoyée...
URL: <http://lists.gforge.inria.fr/pipermail/frama-c-discuss/attachments/20180813/44d320a7/attachment.html>