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

supress error printout of suppressed USAN errors

parent 0042d05a
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -151,6 +151,7 @@ class IvasModeAnalyzer(IvasModeCollector):
        site_config="",
        log_dir="logs",
        formats_fname=None,
        supp_file_provided=False,
        formats_dict={},
        enable_logging=False,
        console_logger_level="",
@@ -174,6 +175,7 @@ class IvasModeAnalyzer(IvasModeCollector):
        self.log_select_list = {}
        self.selected_logs = {}
        self.check = ""
        self.supp_file_provided = supp_file_provided
        self.analyze_encoder = True
        self.analyze_decoder = True
        self.html_table = None
@@ -692,8 +694,11 @@ class IvasModeAnalyzer(IvasModeCollector):

    def get_run_errors(self, failed_modes):

        is_clang_usan = False
        if self.check.lower().startswith("clang"):
            num = int(self.check[-1])
            is_clang_usan = num == 3

            parse_func = functools.partial(self.parse_clang_log, clang_num=num)
            print_func = functools.partial(self.print_clang_errors, clang_num=num)
        elif self.check.lower().startswith("valgrind"):
@@ -719,6 +724,13 @@ class IvasModeAnalyzer(IvasModeCollector):

                    is_failed_mode = mode in failed_modes["enc"]

                    # for clang ubsan with suppression file: non-suppressed errors cause crashes
                    # at runtime. So, if the mode did not fail, all the possibly present errors
                    # in the log files should be part of the suppression file, so do not
                    # print about them or ad them to the html file
                    if is_clang_usan and self.supp_file_provided and not is_failed_mode:
                        continue

                    # add error to html report if it is an actual sanitizer error
                    # or if the en-/decoder crashed
                    if (
@@ -747,6 +759,14 @@ class IvasModeAnalyzer(IvasModeCollector):
                            mode_failed_for_oc = False
                        is_failed_mode = oc_failed_at_least_once and mode_failed_for_oc


                        # for clang ubsan with suppression file: non-suppressed errors cause crashes
                        # at runtime. So, if the mode did not fail, all the possibly present errors
                        # in the log files should be part of the suppression file, so do not
                        # print about them or ad them to the html file
                        if is_clang_usan and self.supp_file_provided and not is_failed_mode:
                            continue

                        # add error to html report if it is an actual sanitizer error
                        # or if the en-/decoder crashed
                        if (
+3 −0
Original line number Diff line number Diff line
@@ -764,6 +764,7 @@ class IvasBuilderAndRunner(IvasBaseClass):
        cfg_name,
        run_tool="",
        run_env={},
        supp_file_provided=False,
        make_options=[],
        defines_to_enable=[],
        defines_to_disable=[],
@@ -853,6 +854,7 @@ class IvasBuilderAndRunner(IvasBaseClass):
                enable_logging=True,
                logger_name="{}.{}analyzer".format(self.logger.name, cfg_name),
                log_level=self.logger.level,
                supp_file_provided=supp_file_provided,
            )
            cfg_dict = {
                cfg_name: {
@@ -1224,6 +1226,7 @@ class IvasBuilderAndRunner(IvasBaseClass):
            defines_to_disable=defines_to_disable_check,
            formats_fname=formats_fname,
            max_workers=max_workers,
            supp_file_provided=usan_supp_file is not None,
        )
        self.build_and_run_dict[check]["analyzer"].check = check