This is an archive of the discontinued LLVM Phabricator instance.

[PPC64, Sanitizers] Proper stack frame for the thread spawned in internal_clone
ClosedPublic

Authored by alekseyshl on Mar 31 2017, 4:14 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

alekseyshl created this revision.Mar 31 2017, 4:14 PM

Couple of inline comments. I think this looks right but I've added Kit and Nemanja on here so one of them can give an ACK if Bill doesn't.

-eric

lib/sanitizer_common/sanitizer_linux.cc
1117 ↗(On Diff #93725)

Do you mean elfv1 vs elfv2 here? The standard one would be just to check for _CALL_ELF == 1 and _CALL_ELF == 2.

1137 ↗(On Diff #93725)

If we're just talking about power64 we can probably just hard code it to N rather than N * sizeof(some type).

alekseyshl updated this revision to Diff 93960.Apr 3 2017, 3:44 PM
alekseyshl marked an inline comment as done.
  • Address comments
lib/sanitizer_common/sanitizer_linux.cc
1117 ↗(On Diff #93725)

That's common practice in sanitizers, sanitizer_platform.h defines SANITIZER_... symbols and those get to be used everywhere. SANITIZER_PPC64V1/2 defined in terms of _CALL_ELF

1137 ↗(On Diff #93725)

Makes sense

alekseyshl removed a reviewer: kcc.Apr 4 2017, 2:13 PM
nemanjai edited edge metadata.Apr 5 2017, 2:29 AM

I can't claim I really understand this sanitizer code, but won't this depend on the decision made as part of this code:
https://reviews.llvm.org/D29881
https://reviews.llvm.org/rL296771

Should we make a modification that always creates a parameter save area for sanitizers? Or is this completely orthogonal?

alekseyshl updated this revision to Diff 94236.Apr 5 2017, 8:43 AM
  • Address comments
  • Drop optional parameter save area on PPC64 ELFv2.

No, it's not a sanitizer specific requirement, I was trying to be generic, unnecessary so, I'd say. Thank you for pointing to those revisions, let's be consistent and drop the parameter save area for ELFv2.

alekseyshl edited reviewers, added: echristo; removed: eugenis.Apr 7 2017, 10:08 AM
hfinkel accepted this revision.Apr 10 2017, 4:03 PM
hfinkel added a subscriber: hfinkel.

LGTM

This revision is now accepted and ready to land.Apr 10 2017, 4:03 PM
This revision was automatically updated to reflect the committed changes.