Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port LSan to arm #294

Closed
ramosian-glider opened this issue Aug 31, 2015 · 9 comments
Closed

Port LSan to arm #294

ramosian-glider opened this issue Aug 31, 2015 · 9 comments

Comments

@ramosian-glider
Copy link
Member

Originally reported on Google Code with ID 294

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 

Reported by chefMax7 on 2014-04-15 06:24:42


- _Attachment: [lsan.diff](https://storage.googleapis.com/google-code-attachments/address-sanitizer/issue-294/comment-0/lsan.diff)_
@ramosian-glider
Copy link
Member Author

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? 

Reported by konstantin.s.serebryany on 2014-04-15 06:47:23

  • Labels added: Type-Enhancement
  • Labels removed: Type-Defect

@ramosian-glider
Copy link
Member Author

Yes, we do.

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

Reported by chefMax7 on 2014-04-15 07:11:54

@ramosian-glider
Copy link
Member Author

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.

Reported by ramosian.glider on 2014-04-15 08:43:23

@ramosian-glider
Copy link
Member Author

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? 

Reported by chefMax7 on 2014-04-15 10:40:30

@ramosian-glider
Copy link
Member Author

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. :) 

Reported by konstantin.s.serebryany on 2014-04-17 08:27:33

@ramosian-glider
Copy link
Member Author

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.

Reported by chefMax7 on 2014-04-29 15:19:32

@ramosian-glider
Copy link
Member Author

I think we can close this issue.

Reported by chefMax7 on 2014-05-06 06:27:59

@ramosian-glider
Copy link
Member Author

Reported by ramosian.glider on 2014-05-06 08:29:31

  • Status changed: WontFix

@ramosian-glider
Copy link
Member Author

Adding Project:AddressSanitizer as part of GitHub migration.

Reported by ramosian.glider on 2015-07-30 09:14:08

  • Labels added: ProjectAddressSanitizer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant