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

framesize rounding code rounds using wrong units leading to slightly oversized frames

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • hs14
    • hs14
    • hotspot
    • b07
    • sparc
    • solaris_9

        I believe that I have found a minor bug in the framesize calculation in chaitin.cpp:
         
          // Convert that to a frame_slot number.
          if( _max_reg <= _matcher._new_SP )
            _framesize = C->out_preserve_stack_slots();
          else _framesize = _max_reg -_matcher._new_SP;
          assert((int)(_matcher._new_SP+_framesize) >= (int)_matcher._out_arg_limit, "framesize must be large enough");
         
          // This frame must preserve the required fp alignment
          const int stack_alignment_in_words = Matcher::stack_alignment_in_slots();
          if (stack_alignment_in_words > 0)
            _framesize = round_to(_framesize, Matcher::stack_alignment_in_bytes());
          assert( _framesize >= 0 && _framesize <= 1000000, "sanity check" );
         
        The granularity of _framesize at this point is OptoReg slots and so should it be aligned to Matcher::stack_alignment_in_slots() instead of Matcher::stack_alignment_in_bytes()? This is causing the minimum framesize on Itanium to be 80 bytes instead of 32 (2 words scratch, 1 word for the original_pc offset, and 1 word for alignment).

              never Tom Rodriguez
              never Tom Rodriguez
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: