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
F108513976: D32773.id97807.diff
Sat, Jan 25, 7:32 PM
Unknown Object (File)
Sat, Jan 18, 5:33 PM
Unknown Object (File)
Tue, Jan 7, 12:22 AM
Unknown Object (File)
Dec 9 2024, 12:18 PM
Unknown Object (File)
Dec 8 2024, 11:37 AM
Unknown Object (File)
Nov 26 2024, 10:38 AM
Unknown Object (File)
Nov 26 2024, 4:50 AM
Unknown Object (File)
Nov 16 2024, 10:39 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.