[PATCH] [compiler-rt] fix and simplify GetMaxVirtualAddress for ppc64*

Will Schmidt willschm at us.ibm.com
Mon Nov 3 15:21:48 PST 2014


>>! In D6044#11, @foad wrote:
> I can confirm that this works for me on big-endian PPC64 Fedora 19.
> 
> But the comments here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55975#c27 suggest that with "ulimit -s unlimited", the stack might not be right up near the 1<<44 or 1<<46 byte limit, so maybe it would be a bit safer to do something like:
> 
>   if (GET_CURRENT_FRAME() < 1ULL << 44)
>     return (1ULL << 44) - 1;
>   else
>     return (1ULL << 46) - 1;
> 
> In practice, on my machine, this doesn't seem to be a problem. Even with "ulimit -s unlimited" the stack is still very close to 1<<46.

Right.  similar experiments here, on an assortment of systems has not shown that 'ulimit -s unlimited' affects the values coming out of the *frame_address(0) calls.

http://reviews.llvm.org/D6044






More information about the llvm-commits mailing list