FreeBSD and LLVM support What is LLVM all about and how it integrates FreeBSD system

Learn how LLVM and FreeBSD work together to help detect and optimize bugs in code, with discussions on sanitizers, address sanitizer, memory sanitizer, and Leap phaser testing technique.

Key takeaways
  • LLVM is a compound of toolset and frontends that can analyze and optimize assembly code across multiple architectures.
  • Sanitizers are tools that run on LLVM IR to detect bugs at runtime.
  • UUID sanitizer and threat sanitizer are supported by FreeBSD.
  • Address sanitizer can detect undefined behavior and address-overflowing code.
  • Memory sanitizer can catch memory-related bugs, such as uninitialized variables and heap overflows.
  • Leap phaser is a testing technique to catch bugs in software and is part of LLVM Xray.
  • Leap phaser generates random inputs and stores them in the same place as the original input.
  • LLVM IR is a high-level representation of the LLM bytecode that can be used to generate code graphs.
  • XQuery implementation allows for performance optimization of the code under test.
  • jmp and symbolication give better defect detection capabilities.
  • Memory sanitizer is able to catch heap overflow by finding a more places and the whole program.
  • It is possible to instrument partial functions with the address sanitizer.
  • It takes a long time to write a full test to check.
  • It generates random inputs.
  • You have to implement phaser tests and put them in the binary.
  • Typically, phasing is run for dozens, or even hundreds, of hours.
  • By default, it generates two configuration files.
  • The place of the issue can be used as the entry point of an unfolding level.
  • The error code reached and the error message (if present).
  • Each bug has ideally of having a unique fingerprint.
  • Each bug can have multiple manifest at the same time.
  • By analyzing the raw data we can tell.
  • Then all sanitizer will generate.
  • For many Fedora LSB build.
  • For more corporate application test.
  • It will be nearer.
  • All are available in FreeBSD since 9/10-ish.
  • The purpose of xray is to show us how our code executes at the various levels.
  • Thank you.