Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 1
    UBSan is actually very lightweight, just an extra condition check (integer overflow, invalid values, bounds checking) here and there, nothing like ASan with complex shadow data structures and instrumentation on every single memory access. And the sort of checks UBSan generates are otherwise hand-written all over the kernel anyway (arithmetic needs to be overflow-proof, values have to be checked for validity, bounds must always be checked, etc.). So the only difference is whether the compiler auto-generates those checks or somebody has to write them by hand. Commented Nov 27 at 14:11
  • 1
    There is a page about this in the kernel docs: Undefined Behavior Sanitizer - UBSAN. Commented Nov 27 at 19:48