[PATCH] [Sanitizer] Update GetMaxVirtualAddress for PowerPC64 Linux

Jay Foad jay.foad at gmail.com
Mon Nov 3 05:29:07 PST 2014


Hi kcc, samsonov, willschm,

On PowerPC64 the sanitizers currently have no reliable way of detecting whether we're using 44- or 46-bit virtual addressing.

Linux switched from 44- to 46-bit in release 3.7, so this patch calls uname(2) and checks the Linux release string to decide what to return. This gets some basic sanitizer functionality working for me on big-endian Fedora 19 (Linux 3.14).

I've left the non-Linux defaults alone, even though they seem pretty arbitrary: 44-bit for big-endian and 46-bit for little-endian.

See also the discussion here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55975

http://reviews.llvm.org/D6082

Files:
  lib/sanitizer_common/sanitizer_posix.cc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6082.15690.patch
Type: text/x-patch
Size: 2875 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141103/0147a4b4/attachment.bin>


More information about the llvm-commits mailing list