- Qbs Manual
- QbsModules
- Sanitizers.address
- Qbs 2.6.0

# Sanitizers.address

Provides AddressSanitizer support. More...

- List of all members, including inherited members

## Properties

- detectUseAfterReturn : string
- detectUseAfterScope : bool
- enabled : bool

## Detailed Description

Provides support for the AddressSanitizer tool, which uses compiler instrumentation to detect memory corruption bugs at runtime.

## Property Documentation

detectUseAfterReturn : string

Controls whether support for detecting problems with stack use after returning from a function should be built into the application.

The possible values are:

- `"always"`: Check for this type of problem unconditionally.
- `"runtime"`: Build with this capability, but only do the respective checks if they are explicitly requested at runtime.
- `"never"`: Do not build with support for this check.

Note: Only the clang compiler (starting at 13.0) supports the full set of values. With GCC and MSVC, "runtime" maps to "always".

Default: `"always"`

detectUseAfterScope : bool

Controls whether to detect bugs relating the use of variables after they've gone out of scope.

Note: This property has no effect when building with with GCC and MSVC.

Default: `true`

enabled : bool

Controls whether to enable AddressSanitizer.

Note: You do not need to check if the current toolchain supports AddressSanitizer: If Qbs detects that it doesn't, this property has no effect.

Default: `true`