This is an archive of the discontinued LLVM Phabricator instance.

[lsan] Deadly signal handler for lsan
ClosedPublic

Authored by vitalybuka on Sep 7 2017, 5:38 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

vitalybuka created this revision.Sep 7 2017, 5:38 PM
eugenis added inline comments.Sep 8 2017, 7:00 PM
compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc
296 ↗(On Diff #114296)

This is mainly a copy of signal handling code from ASan. Are you going to remove the original?

vitalybuka added inline comments.Sep 11 2017, 1:06 PM
compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc
296 ↗(On Diff #114296)

This is almost copy and i'd like to use it for other sanitizes.
Asan report includes scariness score and other asan specific info. So for now I am going to keep asan copy as is and reconsider code reuse later.

eugenis edited edge metadata.Sep 11 2017, 1:12 PM

That's a lot of duplicated code. I'd prefer if you factored out common parts first.

vitalybuka planned changes to this revision.Sep 14 2017, 12:00 PM
eugenis added inline comments.Sep 15 2017, 6:07 PM
compiler-rt/lib/lsan/lsan.cc
77 ↗(On Diff #115370)

What if we are already holding this lock?

Added nested signal protection.

vitalybuka marked an inline comment as done.Sep 18 2017, 10:57 AM
eugenis accepted this revision.Sep 22 2017, 2:06 PM
This revision is now accepted and ready to land.Sep 22 2017, 2:06 PM
This revision was automatically updated to reflect the committed changes.