Bug 62918

Summary: webrtc-audio-processing: analog_agc.c:1651:24: warning: iteration 10u invokes undefined behavior
Product: PulseAudio Reporter: Cristian Rodríguez <crrodriguez>
Component: miscAssignee: pulseaudio-bugs
Status: RESOLVED MOVED QA Contact: pulseaudio-bugs
Severity: normal    
Priority: medium CC: lennart
Version: unspecified   
Hardware: All   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Cristian Rodríguez 2013-03-29 23:54:08 UTC
Gcc 4.8 warns:

analog_agc.c: In function 'WebRtcAgc_Init':
analog_agc.c:1651:24: warning: iteration 10u invokes undefined behavior [-Waggressive-loop-optimizations]
         stt->env[0][i] = 0;
                        ^
analog_agc.c:1649:5: note: containing loop
     for (i = 0; i < 20; i++)
     ^


The warning is correct:


   for (i = 0; i < 20; i++) 
    {    
        stt->env[0][i] = 0; --> WebRtc_Word32  env[2][10]; 
 
    }    

It is iterating waay over the bounds..
Comment 1 Tanu Kaskinen 2013-04-01 07:46:44 UTC
This seems to be fixed in the current upstream WebRTC code. We should update webrtc-audio-processing to the newest upstream. I don't think I'm going to do it myself, though. Arun did the initial "packaging", I'll ask him to comment on this bug.

If someone else wants to work on this, I would love that someone to document the exact steps taken to do the update, so that it would be easier for others to replicate the process when there's need to update again.
Comment 2 GitLab Migration User 2018-07-30 10:09:50 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/250.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.