[PATCH] D15308: [tsan] Support aarch64 for Android.

Adhemerval Zanella via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 05:30:24 PST 2015


zatrazz added inline comments.

================
Comment at: lib/tsan/rtl/tsan_platform.h:129
@@ +128,3 @@
+
+#else
+
----------------
zatrazz wrote:
> yabinc wrote:
> > eugenis wrote:
> > > yabinc wrote:
> > > > eugenis wrote:
> > > > > Is there a reason you are not using the generic aarch64/linux mappings below?
> > > > > For ASan/aarch64/android, I've noticed that ART requires a first 4GB mapping, which seems incompatible with this layout.
> > > > > 
> > > > The Android mapping is different from Mapping39 in kLoAppMemBeg-kLoAppMemEnd. Because
> > > > android links all executables as shared libraries.
> > > > Thanks for reminding. I didn't notice that. I will check it out after my vacation.
> > > You mean PIE?
> > > That linux mapping does not support PIE!
> > > Well it could be a kernel version thing - at some point they moved PIE executable mappings from 0x7f.. to 0x55...
> > > 
> > > I've added a comment to http://reviews.llvm.org/D14199.
> > > 
> > > I don't mind going ahead with this one and figuring out if we want to unify the mappings later.
> > > 
> > Yes, I mean PIE. It might be related to kernel version, or architecture. I am not sure.
> As I commented on the aarch64-linux TSAN mapping unification discussion [1] I did check the tests with -fpic -pie build and I saw no issue. I checked on a recent kernel (3.19) and on this configuration the PIE addresses for TSAN builds are se on 0x7f.. range.
> 
> I will check for 42-bits if TSAN tests fail with PIE build.
> 
> [1] http://reviews.llvm.org/D14199
My first analysis was flawed and PIE flags was not really being used when building the binaries. I rechecked on both 39 and 42 bits VMA and indeed current mapping scheme for aarch64-linux does not support PIE configurations. I have created the revision [1] to fix this issue.

I am not sure if this will work for aarch64-android.

[1] http://reviews.llvm.org/D15447


http://reviews.llvm.org/D15308





More information about the llvm-commits mailing list