Nathan Schagen via llvm-dev
2016-Mar-21 10:48 UTC
[llvm-dev] 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160321/4bba8bff/attachment.html>
Yury Gribov via llvm-dev
2016-Mar-21 12:22 UTC
[llvm-dev] Using Multiple Sanitizers on one program
On 03/21/2016 01:48 PM, Nathan Schagen via llvm-dev wrote:> 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.> Kind regards, > Nathan > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >
Alexander Potapenko via llvm-dev
2016-Mar-21 13:08 UTC
[llvm-dev] Using Multiple Sanitizers on one program
On Mon, Mar 21, 2016 at 1:22 PM, Yury Gribov via llvm-dev <llvm-dev at lists.llvm.org> wrote:> On 03/21/2016 01:48 PM, Nathan Schagen via llvm-dev wrote: >> >> 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.>> Kind regards, >> Nathan >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev