Using Multiple Sanitizers on one program

Hi LLVM people,

Not sure whether this is the best place to ask this.

Given the source of a program, I would like to detect both uninitialized reads and out-of-bounds memory accesses. The latter can be done with the Address Sanitizer (ASan) and the first using the Memory Sanitizer (MSan).

Is there a way to use both at the same time? The --fsanitize option only seems support one of these. What is the reason for this restriction?

Kind regards,
Nathan

Hi LLVM people,

Not sure whether this is the best place to ask this.

Given the source of a program, I would like to detect both uninitialized
reads and out-of-bounds memory accesses. The latter can be done with the
Address Sanitizer (ASan) and the first using the Memory Sanitizer (MSan).

Is there a way to use both at the same time? The --fsanitize option only
seems support one of these. What is the reason for this restriction?

Hi Nathan,

This has been raised several times and conclusion is that this is unlikely to happen due to design limitations. The only possible combination is ASan+UBSan.

Hi LLVM people,

Not sure whether this is the best place to ask this.

Given the source of a program, I would like to detect both uninitialized
reads and out-of-bounds memory accesses. The latter can be done with the
Address Sanitizer (ASan) and the first using the Memory Sanitizer (MSan).

Is there a way to use both at the same time? The --fsanitize option only
seems support one of these. What is the reason for this restriction?

Hi Nathan,

This has been raised several times and conclusion is that this is unlikely
to happen due to design limitations. The only possible combination is
ASan+UBSan.

To elaborate, the slowdowns imposed by both tools will add up, making
time-sensitive code even more fragile.
The combination of ASan and TSan or MSan will require substantially
more memory (ASan bloats heap and stack by adding redzones, other
tools multiply the memory footprint by a constant factor), which will
also slow everything down.