[PATCH] D52900: [PowerPC]Disable randomized address space on Linux ppc64le

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 9 03:49:52 PDT 2018


nemanjai added a comment.

In https://reviews.llvm.org/D52900#1258162, @seurer wrote:

> The similar change for aarch64 was done in
>
> compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc
>
> which seems a more "natural" location for this.  Will that location not work for powerpc64?


I thought this needed to be done for more than just `tsan` on PPC. Lei can correct me if I'm wrong here.

> Also, the wording of the warning is terrible (same as in the aarch64 one).

Feel free to suggest a different wording.



================
Comment at: compiler-rt/lib/sanitizer_common/sanitizer_linux.cc:1998
+#elif SANITIZER_PPC64V2
+  // Disable ASLR for Linux PPC64LE.
+  int old_personality = personality(0xffffffff);
----------------
The comment does not match the macro. I expect that `SANITIZER_PPC64V2` means:
"Sanitizer turned on, platform is PPC, ELFv2 ABI". The ELFv2 ABI does not necessarily suggest Linux on little endian. For example, FreeBSD big endian uses the same ABI.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D52900





More information about the llvm-commits mailing list