Page MenuHomePhabricator

[sanitizer] Don't include <linux/user.h> in sanitizer_stoptheworld_linux_libcdep.cc on ARM Android.
ClosedPublic

Authored by m.ostapenko on Apr 17 2017, 10:45 AM.

Details

Summary

Turned out that adding defined(arm) in sanitizer_stoptheworld_linux_libcdep.cc breaks android arm with some toolchains.

.../llvm/projects/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc:36:11: fatal error:
      'linux/user.h' file not found
# include <linux/user.h>  // for pt_regs
          ^
1 error generated.

Context:
#if SANITIZER_ANDROID && defined(__arm__)
# include <linux/user.h>  // for pt_regs
#else

This patch removes corresponding #if SANITIZER_ANDROID && defined(__arm__) and a bit rearranges adjacent сode.
I don't have Android ARM target, so Kostya, could you help me in testing?

Diff Detail

Repository
rL LLVM

Event Timeline

m.ostapenko created this revision.Apr 17 2017, 10:45 AM
cryptoad edited edge metadata.EditedApr 17 2017, 10:53 AM

Works for me on my Android ARM & AArch64 testbeds.

eugenis accepted this revision.Apr 17 2017, 1:06 PM

LGTM
works for me, too

This revision is now accepted and ready to land.Apr 17 2017, 1:06 PM
This revision was automatically updated to reflect the committed changes.