mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-12-02 05:03:39 +08:00
libsafety: trap UBSan errors (#3943)
This commit is contained in:
committed by
firestar5683
parent
773dc0ff31
commit
fc9a815bc8
@@ -26,6 +26,8 @@ def _build_libsafety(release: bool = False, output_dir: str | Path | None = None
|
||||
ldflags = ['-fprofile-arcs', '-ftest-coverage']
|
||||
else:
|
||||
ldflags = ['-fsanitize=undefined', '-fno-sanitize-recover=undefined']
|
||||
if os.environ.get("SAFETY_UBSAN_TRAP") == "1":
|
||||
ldflags.append('-fsanitize-undefined-trap-on-error')
|
||||
cflags += ldflags
|
||||
if not release:
|
||||
cflags += ['-DALLOW_DEBUG']
|
||||
|
||||
Reference in New Issue
Block a user