Commit 2afa4141 authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

Merge branch...

Merge branch 'float-1593-fix_1585_asan_format_sw_alt-format-switching-memory-changes-cause-msan-asan-errors-in' into 'main'

Resolve "FIX_1585_ASAN_FORMAT_SW_ALT / Format switching memory changes cause MSAN/ASAN errors in decoder usage"

See merge request !2627
parents 9d89f5cc 745c2dc4
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@
#define FIX_FLOAT_1539_G192_FORMAT_SWITCH               /* Nokia: reintroduce format switching for g192 bitstreams */
#define FIX_2095_REMOVE_UNUSED_ISAR_TABLES              /* Dolby: remove unused ISAR */
#define FIX_FLOAT_1582_STEREO_DFT_QUANTIZE_ITD          /* FhG: float issue 1582: Remove unncessary statement from stereo_dft_quantize_itd() */
#define FIX_1585_ASAN_FORMAT_SW_ALT                     /* VA: float issue 1585: alternative fix memory leaks with format switching */
#define FIX_1585_ASAN_FORMAT_SW_ALT                     /* VA,FhG: float issues 1585,1593: alternative fix memory leaks with format switching */

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

+3 −6
Original line number Diff line number Diff line
@@ -2327,12 +2327,6 @@ ivas_error ivas_init_decoder(
        set_f( st_ivas->mem_hp20_out[i], 0.0f, L_HP20_MEM );
    }

#ifdef FIX_1585_ASAN_FORMAT_SW_ALT
    for ( ; i < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; i++ )
    {
        st_ivas->mem_hp20_out[i] = NULL;
    }
#endif

    /*-------------------------------------------------------------------*
     * Allocate and initialize rendering handles
@@ -2905,6 +2899,9 @@ void ivas_initialize_handles_dec(
    for ( i = 0; i < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; i++ )
    {
        st_ivas->p_output_f[i] = NULL;
#ifdef FIX_1585_ASAN_FORMAT_SW_ALT
        st_ivas->mem_hp20_out[i] = NULL;
#endif
    }

    return;