stack size limit on ppc/ppc64

Anil K Prasad aprasad at
Wed Nov 5 10:16:29 EST 2003

Hi All,

I have code which shouldn't work, working under ppc64 linux.
int main()
      char *p = (char*)0x50000000;

      while(p < 0xfffff000){
            *p = 'a';
      return 0;

Theoretically, above code should cause segmentation violation. But on ppc64
linux, it puts variable 'p ' in stack segment, I looked at /proc/pid/maps,
and there was huge memory area from 0x50000000 ---> 0xFFFFF000.

It behaving perfectly as expected on Intel Linux i.e. causing segmentation
violation. Even on ppc64 If I make ptr to point to un-used segment between
text and data, then it get signal 11.

Is there any reason for increasing stack range from upper end address to
any arbitrary address??


** Sent via the linuxppc64-dev mail list. See

More information about the Linuxppc64-dev mailing list