Page MenuHomePhabricator

[lsan] Factor pthread-specific assumptions out of thread tracking code

Authored by mcgrathr on Thu, Jan 23, 4:49 PM.



This is a small refactoring to prepare for porting LSan to Fuchsia.
Factor out parts of lsan_thread.{cpp,h} that don't apply to Fuchsia.
Since existing supported systems are POSIX-based, the affected code
is moved to lsan_posix.{cpp.h}.

Diff Detail

Event Timeline

mcgrathr created this revision.Thu, Jan 23, 4:49 PM
vitalybuka accepted this revision.Fri, Jan 24, 1:41 AM
vitalybuka added inline comments.

can you make it more consistent?
type name1;
type name2;


is this clang-formated?


same about one per line


maybe here and else
uptr stack_begin_ = 0;

This revision is now accepted and ready to land.Fri, Jan 24, 1:41 AM
mcgrathr updated this revision to Diff 240320.Fri, Jan 24, 4:17 PM
mcgrathr marked 2 inline comments as done.

Style changes to copied code, clang-format.

mcgrathr marked 3 inline comments as done.Fri, Jan 24, 4:23 PM

I've made the style changes you asked for and clang-format'd the files I touched. But note that all of these changes are to existing code that I just moved and left exactly as it had been and not anything I'd added. I erred on the side of leaving things alone rather than cleaning them up. I've now done the opposite as you asked, though it's not entirely consistent with the style and formatting of the existing code in the same directory. I'm happy to use whatever style choices you prefer, but it's easiest to do that when the codebase is consistent with those choices already.


Consistent with what?
I'm happy to use whatever style rules you prefer.
But there's no sign that one-declaration-per-line is the prevailing sign in the existing codebase.

I'm changing this as you asked, but it was verbatim moved from the existing code in the other file and all the style choices were not mine.


It was moved verbatim from the old code.

This revision was automatically updated to reflect the committed changes.