Commit e65c4372 authored by Jan Kiene's avatar Jan Kiene
Browse files

Merge branch...

Merge branch 'float-1486-clang18-msan-use-of-uninitialized-value-in-lib_com-ivas_tools-c-134-23' into 'main'

Resolve "[CLANG18] MSAN: use-of-uninitialized-value in lib_com/ivas_tools.c:134:23"

See merge request !2692
parents c81254b0 1f209a2c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -113,6 +113,7 @@
#define FIX_1872_REMOVE_UNUSED_PSNOISEGEN_ISAR              /* Dolby: Remove unused psNoiseGen from ISAR */
#define FIX_1478_UNINIT_ON_BFI                          /* VA: Fix issue 1478 where a vector is partly un-initialized during bfi */
#define FIX_1487_ACCESS_OF_UNINIT_VAL_FROM_ARR_ISM_DTX  /* FhG/VA: init nb_bits_metadata to zero */
#define FIX_1486_INIT_OUTPUT_POINTERS                   /* FhG: always initialize pointers in renderer flush */
#define FIX_2290_COPY_OF_UNINIT_DATA                    /* VA: prevent the copy of un-initialized data */
#define CLEANUP_ACELP_ENC                               /* VA: basop issue 2304: Remove duplicated code in excitation encoding in the ACELP core */
#define CLEANUP_VBR_CAM_ENC                             /* VA: basop issue 2299: Remove unused core-encoder VBR and CAM code */
+19 −0
Original line number Diff line number Diff line
@@ -2473,12 +2473,23 @@ ivas_error ivas_jbm_dec_flush_renderer_fx(
    DECODER_TC_BUFFER_HANDLE hTcBuffer;
    Word32 *p_output_fx[MAX_LS_CHANNELS + MAX_NUM_OBJECTS];
    Word16 nchan_in, nchan_out;
#ifdef FIX_1486_INIT_OUTPUT_POINTERS
    Word16 ch_idx;
#endif


    IF( !st_ivas->hDecoderConfig->Opt_tsm )
    {
        return IVAS_ERR_OK;
    }

#ifdef FIX_1486_INIT_OUTPUT_POINTERS
    FOR( ch_idx = 0; ch_idx < ( MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS ); ch_idx++ )
    {
        p_output_fx[ch_idx] = st_ivas->p_output_fx[ch_idx];
    }
#endif

    *nSamplesRendered = 0;
    move16();
    hTcBuffer = st_ivas->hTcBuffer;
@@ -2504,7 +2515,9 @@ ivas_error ivas_jbm_dec_flush_renderer_fx(

    IF( n_slots_still_available )
    {
#ifndef FIX_1486_INIT_OUTPUT_POINTERS
        Word16 ch_idx;
#endif

        /* render available full slots (with new lower granularity) */
        FOR( ch_idx = 0; ch_idx < s_max( hTcBuffer->nchan_transport_rend, hTcBuffer->nchan_buffer_full ); ch_idx++ )
@@ -2534,10 +2547,12 @@ ivas_error ivas_jbm_dec_flush_renderer_fx(
        move16();
        move16();

#ifndef FIX_1486_INIT_OUTPUT_POINTERS
        FOR( ch_idx = 0; ch_idx < ( MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS ); ch_idx++ )
        {
            p_output_fx[ch_idx] = st_ivas->p_output_fx[ch_idx];
        }
#endif

        test();
        IF( EQ_16( st_ivas->ivas_format, ISM_FORMAT ) )
@@ -2788,7 +2803,11 @@ ivas_error ivas_jbm_dec_flush_renderer_fx(
        IF( NE_16( st_ivas->ivas_format, MONO_FORMAT ) )
        {
#ifndef DISABLE_LIMITER
#ifndef FIX_1486_INIT_OUTPUT_POINTERS
            Word16 ch_idx, exp = 11;
#else
            Word16 exp = 11;
#endif
            move16();
            FOR( ch_idx = 0; ch_idx < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; ch_idx++ )
            {