This is an archive of the discontinued LLVM Phabricator instance.

[sanitizer] [msan] VarArgHelper for AArch64
ClosedPublic

Authored by zatrazz on Dec 9 2015, 10:52 AM.

Details

Summary

This patch add support for variadic argument for AArch64. All the MSAN
unit tests are not passing as well the signal_stress_test (currently
set as XFAIl for aarch64).

Diff Detail

Event Timeline

zatrazz updated this revision to Diff 42318.Dec 9 2015, 10:52 AM
zatrazz retitled this revision from to [sanitizer] [msan] VarArgHelper for AArch64.
zatrazz updated this object.
zatrazz added reviewers: pcc, rengolin, samsonov, eugenis.
zatrazz added a subscriber: llvm-commits.
eugenis edited edge metadata.Dec 9 2015, 11:26 AM

I did not go too deep into the ABI details, but this looks fine, provided that the tests in lib/msan/tests/msan_test.cc pass.
Please add an IR-level test. We don't have that for other platforms, unfortunately.

zatrazz updated this revision to Diff 42436.Dec 10 2015, 9:23 AM
zatrazz edited edge metadata.

Changes from previous version:

  • Fixed some typos and comments wording.
  • Fixed the AArch64VrEndOffset value to correct one (it was based on general purpose register side, instead of the VR stat address which is aligned to 16 bytes).
  • Changed the way the address plus offset is calculate from a addition to a GEP instruction. This fixes some issues when using opt -msan on the testcase (it complains about using different types on the addition).
  • Added a testcase.
eugenis accepted this revision.Dec 10 2015, 11:59 AM
eugenis edited edge metadata.

You might need a lit.local.cfg in the AArch directory so that this test only runs when llvm is built with aarch64 support.

This revision is now accepted and ready to land.Dec 10 2015, 11:59 AM

You might need a lit.local.cfg in the AArch directory so that this test only runs when llvm is built with aarch64 support.

I do not think this is required, the instrumentation phase is built regardless if the backend is supported or not. So even without AArch64 backend, 'opt -msan' with target set to aarch64-linux will work.

You are right, it's not required.
LGTM.

zatrazz closed this revision.Dec 14 2015, 6:18 AM