From 067f70906e93555969842dfa22828a5a0e66f190 Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Thu, 15 Jan 2026 10:50:31 +0100 Subject: [PATCH 1/8] change Makefile to assure use of clang-18 --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c9ae4493d..1fa184306 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ endif endif ifndef VERBOSE -QUIET_CC = @echo ' ' Compiling $<; +QUIET_CC = @echo ' ' Compiling $< with $(CC); QUIET_LINK= @echo ' ' Linking $@; QUIET_AR = @echo ' ' Archiving $@; QUIET = @ @@ -75,7 +75,7 @@ CFLAGS += -Wunused-but-set-variable LDLIBS += -lm # Clang sanitizer compiler options -CCCLANG = clang +CCCLANG = clang-18 ifeq "$(CLANG)" "0" CC = $(CCCLANG) endif -- GitLab From 464a060cd5511a03e583d1a62660365ec60fa409 Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Thu, 15 Jan 2026 10:50:49 +0100 Subject: [PATCH 2/8] initialize currentPanGains_fx --- lib_rend/lib_rend_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_rend/lib_rend_fx.c b/lib_rend/lib_rend_fx.c index 03286b669..8365436c2 100644 --- a/lib_rend/lib_rend_fx.c +++ b/lib_rend/lib_rend_fx.c @@ -6987,7 +6987,7 @@ static ivas_error renderIsmToSba( Word8 position_changed; Word16 ambiOrderOut; Word16 numOutChannels; - pan_vector_fx currentPanGains_fx; + pan_vector_fx currentPanGains_fx = { 0 }; //Solve Clang-18 warnings ivas_error error; error = IVAS_ERR_OK; move32(); -- GitLab From 24056b7e43b1214a1dbd246d4a5867c503274f94 Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Thu, 15 Jan 2026 14:00:55 +0100 Subject: [PATCH 3/8] Revert "change Makefile to assure use of clang-18" This reverts commit 067f70906e93555969842dfa22828a5a0e66f190. --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1fa184306..c9ae4493d 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ endif endif ifndef VERBOSE -QUIET_CC = @echo ' ' Compiling $< with $(CC); +QUIET_CC = @echo ' ' Compiling $<; QUIET_LINK= @echo ' ' Linking $@; QUIET_AR = @echo ' ' Archiving $@; QUIET = @ @@ -75,7 +75,7 @@ CFLAGS += -Wunused-but-set-variable LDLIBS += -lm # Clang sanitizer compiler options -CCCLANG = clang-18 +CCCLANG = clang ifeq "$(CLANG)" "0" CC = $(CCCLANG) endif -- GitLab From 06cecdc441a70c03e4d039b403324830b3bcd14d Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Thu, 15 Jan 2026 14:26:38 +0100 Subject: [PATCH 4/8] clang patch --- lib_rend/lib_rend_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_rend/lib_rend_fx.c b/lib_rend/lib_rend_fx.c index 8365436c2..0d99494dd 100644 --- a/lib_rend/lib_rend_fx.c +++ b/lib_rend/lib_rend_fx.c @@ -6987,7 +6987,7 @@ static ivas_error renderIsmToSba( Word8 position_changed; Word16 ambiOrderOut; Word16 numOutChannels; - pan_vector_fx currentPanGains_fx = { 0 }; //Solve Clang-18 warnings + pan_vector_fx currentPanGains_fx = { 0 }; // Solve Clang-18 warnings ivas_error error; error = IVAS_ERR_OK; move32(); -- GitLab From b5aca16b8bdcae419eaafd662a621212d8d5d77b Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Mon, 19 Jan 2026 11:13:57 +0100 Subject: [PATCH 5/8] introduce macro to switch --- lib_com/options.h | 1 + lib_rend/lib_rend_fx.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 4a272cf24..8ea131856 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -124,6 +124,7 @@ #define REMOVE_UNUSED_CODE_IVAS_DEC /* VA: remove unused code in ivas_jbm_dec_tc_fx() */ #define FIX_2294_CLANG_18_WARNINGS_ENC /* VA: Fix some encoder clang-18 warnings, desc. in 2294 */ #define REMOVE_CAM_FROM_IVAS /* VA: basop issue 210: remove obsoelte CAM code from IVAS */ +#define FIX_2331_CLANG18_MSAN_UNINIT_VARIABLE /* FhG: Fix issue 2331: Uninitialized variable */ /* #################### End BE switches ################################## */ diff --git a/lib_rend/lib_rend_fx.c b/lib_rend/lib_rend_fx.c index 0d99494dd..d566e9c51 100644 --- a/lib_rend/lib_rend_fx.c +++ b/lib_rend/lib_rend_fx.c @@ -6987,7 +6987,11 @@ static ivas_error renderIsmToSba( Word8 position_changed; Word16 ambiOrderOut; Word16 numOutChannels; +#ifdef FIX_2331_CLANG18_MSAN_UNINIT_VARIABLE pan_vector_fx currentPanGains_fx = { 0 }; // Solve Clang-18 warnings +#else + pan_vector_fx currentPanGains_fx; +#endif ivas_error error; error = IVAS_ERR_OK; move32(); -- GitLab From cdee93223d32170984940e30013fc62b204cd806 Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Mon, 19 Jan 2026 11:17:42 +0100 Subject: [PATCH 6/8] resolve conflicts --- lib_com/options.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 4108e0d26..e70cb9714 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -98,14 +98,11 @@ #define REMOVE_UNUSED_CODE_IVAS_DEC /* VA: remove unused code in ivas_jbm_dec_tc_fx() */ #define FIX_2294_CLANG_18_WARNINGS_ENC /* VA: Fix some encoder clang-18 warnings, desc. in 2294 */ #define REMOVE_CAM_FROM_IVAS /* VA: basop issue 210: remove obsoelte CAM code from IVAS */ -<<<<<<< HEAD -#define FIX_2331_CLANG18_MSAN_UNINIT_VARIABLE /* FhG: Fix issue 2331: Uninitialized variable */ -======= #define OPT_BE_2311_HARM_GSC_GAIN /* VA: issue 2311: BE part of the GSC gain harmonization pipeline #70380 shows the BE */ #define HARM_CORECODER_UPDT /* VA: basop issue 2342: Remove duplicated code in core-coder common update functions */ #define HARM_CORE_SW /* VA: basop issue 2314: Remove duplicated code in the core switching */ #define HARM_PREPROC /* VA: basop issue 2339: Remove duplicated code in the core-coder DTX */ ->>>>>>> origin +#define FIX_2331_CLANG18_MSAN_UNINIT_VARIABLE /* FhG: Fix issue 2331: Uninitialized variable */ /* #################### End BE switches ################################## */ -- GitLab From d786b13bad5403c6910950c1ddee76d8e8c7dddf Mon Sep 17 00:00:00 2001 From: Fabian Bauer Date: Mon, 19 Jan 2026 14:42:25 +0100 Subject: [PATCH 7/8] correct instrumentation --- lib_rend/lib_rend_fx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib_rend/lib_rend_fx.c b/lib_rend/lib_rend_fx.c index 28ee99d8c..a4afac9eb 100644 --- a/lib_rend/lib_rend_fx.c +++ b/lib_rend/lib_rend_fx.c @@ -6952,10 +6952,9 @@ static ivas_error renderIsmToSba( Word8 position_changed; Word16 ambiOrderOut; Word16 numOutChannels; -#ifdef FIX_2331_CLANG18_MSAN_UNINIT_VARIABLE - pan_vector_fx currentPanGains_fx = { 0 }; // Solve Clang-18 warnings -#else pan_vector_fx currentPanGains_fx; +#ifdef FIX_2331_CLANG18_MSAN_UNINIT_VARIABLE + set32_fx( currentPanGains_fx, 0, MAX_OUTPUT_CHANNELS ); #endif ivas_error error; error = IVAS_ERR_OK; -- GitLab From f1044b00c6d691307574f5b86de25c166bf60f62 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 19 Jan 2026 21:10:22 +0100 Subject: [PATCH 8/8] move after variable declaration block --- lib_rend/lib_rend_fx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib_rend/lib_rend_fx.c b/lib_rend/lib_rend_fx.c index a4afac9eb..697b87fbf 100644 --- a/lib_rend/lib_rend_fx.c +++ b/lib_rend/lib_rend_fx.c @@ -6953,13 +6953,14 @@ static ivas_error renderIsmToSba( Word16 ambiOrderOut; Word16 numOutChannels; pan_vector_fx currentPanGains_fx; -#ifdef FIX_2331_CLANG18_MSAN_UNINIT_VARIABLE - set32_fx( currentPanGains_fx, 0, MAX_OUTPUT_CHANNELS ); -#endif ivas_error error; error = IVAS_ERR_OK; move32(); +#ifdef FIX_2331_CLANG18_MSAN_UNINIT_VARIABLE + set32_fx( currentPanGains_fx, 0, MAX_OUTPUT_CHANNELS ); +#endif + ismInput->currentPos.azimuth_fx = L_shl( L_shr( L_add( ismInput->currentPos.azimuth_fx, ONE_IN_Q21 ), Q22 ), Q22 ); ismInput->currentPos.elevation_fx = L_shl( L_shr( L_add( ismInput->currentPos.elevation_fx, ONE_IN_Q21 ), Q22 ), Q22 ); ismInput->previousPos.azimuth_fx = L_shl( L_shr( L_add( ismInput->previousPos.azimuth_fx, ONE_IN_Q21 ), Q22 ), Q22 ); -- GitLab