Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8144343

[aix] Stack bottom should be page aligned

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • None
    • b99
    • aix

      On thread start or attach, we query the OS for the stack dimensions of the current stack. These dimensions are normally 4k page aligned, but do not have to be. Very rarely we get an unaligned stack bottom (top is never aligned but that does not matter), typically for the initial thread. In that case we fail to establish the red/yellow guard pages and the VM dies during initialization.

      The picture is even more complicated because in 64k page mode, we keep up the notion of 64k-paged-everything, which is not true. Even then pthread stacks are only 4k page aligned. In order to prevent errors further down, stack dimensions - and hence guardpage placement - should be 64k page aligned in this mode.

      In short, we need to always align stack bottom up to os::vm_page_size(), be it 4K or 64K.

            stuefe Thomas Stuefe
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: