[asterisk-bugs] [JIRA] (ASTERISK-27580) [patch] lpc10: Array may be uninitialized.

Alexander Traud (JIRA) noreply at issues.asterisk.org
Thu May 28 05:37:25 CDT 2020


     [ https://issues.asterisk.org/jira/browse/ASTERISK-27580?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Traud updated ASTERISK-27580:
---------------------------------------

          Description: 
{{./configure && make}} and Ubuntu 14.04 LTS (GCC 4.8.2), Ubuntu 16.04 LTS (GCC 5.4.0), Ubuntu 18.04 LTS (GCC 7.5.0) report:{code}irc2pc.c:145:12: warning: 'temp[9]' may be used uninitialized in this function [-Wmaybe-uninitialized]
      pc[j] = temp[j - 1];
      ~~~~~~^~~~~~~~~~~~~
irc2pc.c:145:12: warning: 'temp[8]' may be used uninitialized in this function [-Wmaybe-uninitialized]
irc2pc.c:145:12: warning: 'temp[7]' may be used uninitialized in this function [-Wmaybe-uninitialized]{code}This does not happen, when optimization is level 2 or lower, like off. This does not happen in the alternative compiler _clang_. It is just GCC with (Asterisk’s default of) -O3 or -Ofast.

  was:
{{./configure && make}} and Ubuntu 14.04 LTS (GCC 4.8.2), Ubuntu 16.04 LTS (GCC 5.3.1), Ubuntu 18.04 LTS (GCC 7.2) report:{code}irc2pc.c:145:12: warning: 'temp[9]' may be used uninitialized in this function [-Wmaybe-uninitialized]
      pc[j] = temp[j - 1];
      ~~~~~~^~~~~~~~~~~~~
irc2pc.c:145:12: warning: 'temp[8]' may be used uninitialized in this function [-Wmaybe-uninitialized]
irc2pc.c:145:12: warning: 'temp[7]' may be used uninitialized in this function [-Wmaybe-uninitialized]{code}This does not happen, when optimization is level 2 or lower, like off. This does not happen in the alternative compiler _clang_. It is just GCC with (Asterisk’s default of) -O3.

    Affects Version/s:     (was: 15.2.0)
                       16.10.0
                       17.4.0

> [patch] lpc10: Array may be uninitialized.
> ------------------------------------------
>
>                 Key: ASTERISK-27580
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-27580
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: Codecs/codec_lpc10
>    Affects Versions: 16.10.0, 17.4.0
>            Reporter: Alexander Traud
>            Severity: Minor
>              Labels: patch
>         Attachments: lpc10_array_init.patch
>
>
> {{./configure && make}} and Ubuntu 14.04 LTS (GCC 4.8.2), Ubuntu 16.04 LTS (GCC 5.4.0), Ubuntu 18.04 LTS (GCC 7.5.0) report:{code}irc2pc.c:145:12: warning: 'temp[9]' may be used uninitialized in this function [-Wmaybe-uninitialized]
>       pc[j] = temp[j - 1];
>       ~~~~~~^~~~~~~~~~~~~
> irc2pc.c:145:12: warning: 'temp[8]' may be used uninitialized in this function [-Wmaybe-uninitialized]
> irc2pc.c:145:12: warning: 'temp[7]' may be used uninitialized in this function [-Wmaybe-uninitialized]{code}This does not happen, when optimization is level 2 or lower, like off. This does not happen in the alternative compiler _clang_. It is just GCC with (Asterisk’s default of) -O3 or -Ofast.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list