Skip to content

Commit 2cde5fa

Browse files
draft MDBF-1195: UBSAN suppressions
1 parent 719fcca commit 2cde5fa

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

  • configuration/builders/sequences/connectors

configuration/builders/sequences/connectors/conodbc.py

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ def bintar(
650650
source_path: str,
651651
with_asan_ubsan=False,
652652
):
653-
653+
sequence = BuildSequence()
654654
env_vars = None
655655
flags = [
656656
CMakeOption(OTHER.CONC_WITH_UNIT_TESTS, False),
@@ -659,6 +659,24 @@ def bintar(
659659
]
660660

661661
if with_asan_ubsan:
662+
sequence.add_step(
663+
InContainer(
664+
ShellStep(
665+
command=BashCommand(
666+
name="Create UBSAN suppression file",
667+
workdir=PurePath("."),
668+
cmd='printf "%s\n" '
669+
'"invalid-shift-base:ps_fetch_from_1_to_8_bytes" '
670+
'"invalid-shift-base:ps_fetch_int32" '
671+
'"null-pointer-use:all_other_fields_test" '
672+
'"function-type-mismatch:ma_stmt_execute_generate_bulk_request" '
673+
"> UBSAN.supp",
674+
),
675+
),
676+
docker_environment=config,
677+
)
678+
)
679+
662680
flags.append(CMakeOption(WITH.ASAN, True))
663681
flags.append(CMakeOption(WITH.UBSAN, True))
664682
env_vars = [
@@ -668,11 +686,10 @@ def bintar(
668686
),
669687
(
670688
"UBSAN_OPTIONS",
671-
"print_stacktrace=1:report_error_type=1:halt_on_error=1",
689+
"suppressions=UBSAN.supp:print_stacktrace=1:report_error_type=1:halt_on_error=1",
672690
),
673691
]
674692

675-
sequence = BuildSequence()
676693
sequence.add_step(
677694
InContainer(
678695
ShellStep(

0 commit comments

Comments
 (0)