lewisje / address-sanitizer

Automatically exported from code.google.com/p/address-sanitizer
0 stars 0 forks source link

Port LSan to arm #294

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi all,

reviews.llvm.org is currently unreachable, so I'm writing directly to this list.

This patch provides initial LSan support for arm (TLS is not yet supported).

Compiler-rt doesn't support cross-compilation, so we just ran numerous (for 
about 10) LSan tests manually on target board.
All tests have successfully passed (all leaks were detected and backtraces were 
correct).

Does the patch make sense?

-Maxim 

Original issue reported on code.google.com by chefM...@gmail.com on 15 Apr 2014 at 6:24

Attachments:

GoogleCodeExporter commented 9 years ago
You don't need reviews.llvm.org,
please follow https://code.google.com/p/address-sanitizer/wiki/HowToContribute

By ARM, do you mean ARM Linux? 

Original comment by konstant...@gmail.com on 15 Apr 2014 at 6:47

GoogleCodeExporter commented 9 years ago
Yes, we do.

Done to llvm-commits@cs.uiuc.edu.

Original comment by chefM...@gmail.com on 15 Apr 2014 at 7:11

GoogleCodeExporter commented 9 years ago
Am I understanding right that this is 32-bit ARM?
If so, have you tested this patch on any sufficiently big app?

The problem with 32-bit architectures is that a random 32-bit number is very 
likely to be treated as a pointer to some existing allocation. This may lead to 
false negatives in leak detection.
In fact that's why there's no 32-bit x86 LSan.

Original comment by ramosian.glider@gmail.com on 15 Apr 2014 at 8:43

GoogleCodeExporter commented 9 years ago
Yes, that's 32-bit ARM Linux

The most complicated code that we've tested was bash, it works fine with LSan. 
Is it enough big or maybe we should test some bigger apps? Do you have any 
suggestions? 

Original comment by chefM...@gmail.com on 15 Apr 2014 at 10:40

GoogleCodeExporter commented 9 years ago
using 32-bit leak detector becomes painful after some period of deployment, 
as we've learned in a hard way.
The major trouble is that the leak detector has lots of flaky false negatives
(missed leaks)
https://code.google.com/p/valgrind-variant/wiki/LeakCheckingOn32bits

If you have a choice to use AArch64 instead of ARM for leak detection, go for 
it.
If no, then, well, we've warned you. :) 

Original comment by konstant...@gmail.com on 17 Apr 2014 at 8:27

GoogleCodeExporter commented 9 years ago
Hm, you are actually right - LSan on ARM only finds about 15% of leaks. The 
results are close to valgrind's on x86 so we decided to halt our work.

Original comment by chefM...@gmail.com on 29 Apr 2014 at 3:19

GoogleCodeExporter commented 9 years ago
I think we can close this issue.

Original comment by chefM...@gmail.com on 6 May 2014 at 6:27

GoogleCodeExporter commented 9 years ago

Original comment by ramosian.glider@gmail.com on 6 May 2014 at 8:29

GoogleCodeExporter commented 9 years ago
Adding Project:AddressSanitizer as part of GitHub migration.

Original comment by ramosian.glider@gmail.com on 30 Jul 2015 at 9:14