Page MenuHomeFreeBSD

Add descriptions for WITH_ASAN and WITH_UBSAN
ClosedPublic

Authored by emaste on Nov 1 2021, 1:17 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 6, 10:04 PM
Unknown Object (File)
Jan 17 2024, 7:13 AM
Unknown Object (File)
Jan 15 2024, 5:49 PM
Unknown Object (File)
Dec 20 2023, 5:42 AM
Unknown Object (File)
Dec 12 2023, 4:08 AM
Unknown Object (File)
Nov 30 2023, 3:27 PM
Unknown Object (File)
Sep 19 2023, 9:25 PM
Unknown Object (File)
Sep 17 2023, 1:10 AM
Subscribers

Details

Summary

Fixes: R10:7bc797e3f380 ("Add build system support for ASAN+UBSAN instrumentation")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emaste requested review of this revision.Nov 1 2021, 1:17 PM
emaste created this revision.

Also requires some of the sanitiser run-time libraries from lib/libclang_rt

They get built automatically when compiling with Clang - there's no option that needs to be turned on for them. My intent with this statement was to report that the option doesn't work if using GCC (via external toolchain). Any suggestion to make that more clear?

The generated src.conf.5 has:

+.It Va WITH_ASAN
+Build the base system with Address Sanitizer (ASan) to detect
+memory corruption bugs such as buffer overflows or use-after-free.
+Requires Clang as base system compiler.
+When set, it enforces these options:
+.Pp
+.Bl -item -compact
+.It
+.Va WITH_LLVM_BINUTILS
+.It
+.Va WITH_LLVM_CXXFILT
+.El

They get built automatically when compiling with Clang - there's no option that needs to be turned on for them

Sure, but they're only built for a limited number of architectures

Sure, but they're only built for a limited number of architectures.

Ah yes, good point. Maybe "Requires that Clang be used as the base system compiler and that the runtime support library is available."

  • Mention runtimes based on @jrtc27's comment
  • Add generated src.conf.5 for reference
This revision is now accepted and ready to land.Nov 1 2021, 2:30 PM
This revision was automatically updated to reflect the committed changes.