Commit 2762e490 authored by Tapani Pihlajakuja's avatar Tapani Pihlajakuja
Browse files

Merge branch...

Merge branch 'basop-2329-clang18-msan-use-of-uninitialized-value-in-lib_rend-lib_rend_fx-c-11230-9' into 'main'

Resolve "[CLANG18] MSAN: use-of-uninitialized-value in lib_rend/lib_rend_fx.c:11230:9"

Closes #2329

See merge request !2723
parents cd37dc94 a7a8ce92
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -112,6 +112,7 @@
#define FIX_BASOP_2326_WRONG_SIG_LENGTH                 /* Nokia: basop issue 2326: Fix issue by using correct signal length in multiple places */
#define FIX_BASOP_2327_WRONG_LOOP_END                   /* Nokia: basop inssue 2327: Correct loop end to solve MSAN error */
#define FIX_BASOP_2328_MSAN_WRONG_ASSIGNMENT            /* Nokia: basop issue 2328: Fix MSAN error by correcting the variable assignment */
#define FIX_BASOP_2329_UNINIT_VALUE                     /* Nokia: basop issue 2329: Fix issue by checking for structure instead of length */

/* #################### End BE switches ################################## */

+5 −0
Original line number Diff line number Diff line
@@ -856,6 +856,11 @@ ivas_error ivas_dirac_alloc_mem_fx(
    /* Prototypes */
    hDirAC_mem->proto_direct_buffer_f_fx = NULL;
    hDirAC_mem->proto_diffuse_buffer_f_fx = NULL;
#ifdef FIX_BASOP_2329_UNINIT_VALUE
    hDirACRend->h_output_synthesis_psd_state.proto_direct_buffer_f_len = 0;
    hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_len = 0;
    hDirAC_mem->proto_diffuse_buffer_f_len = 0;
#endif
    test();
    test();
    IF( NE_32( renderer_type, RENDERER_BINAURAL_PARAMETRIC ) && NE_32( renderer_type, RENDERER_BINAURAL_PARAMETRIC_ROOM ) && NE_32( renderer_type, RENDERER_STEREO_PARAMETRIC ) )
+4 −0
Original line number Diff line number Diff line
@@ -11206,7 +11206,11 @@ static void intermidiate_ext_dirac_render(
            move16();
        }

#ifdef FIX_BASOP_2329_UNINIT_VALUE
        IF( hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_fx )
#else
        IF( hDirACRend->h_output_synthesis_psd_state.proto_diffuse_buffer_f_len > 0 )
#endif
        {
            Word16 shift, norm1, norm2;
            Word32 tmp1, tmp2;