<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Looks good Coleen.<br>
    <br>
    Harold<br>
    <br>
    On 2/4/2013 12:07 PM, Coleen Phillimore wrote:
    <blockquote cite="mid:510FEAB8.2060202@oracle.com" type="cite">
      <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
      <div class="moz-cite-prefix"><br>
        Volker, <br>
        <br>
        This looks good.  I'll check this in for you, pending more
        reviews.  I also added the test because even though it's a
        nothing-test, it'll test UseMallocOnly and exposes this bug.<br>
        <br>
        open webrev at <a moz-do-not-send="true"
          class="moz-txt-link-freetext"
          href="http://cr.openjdk.java.net/%7Ecoleenp/8007475/">http://cr.openjdk.java.net/~coleenp/8007475/</a><br>
        bug link at <a moz-do-not-send="true"
          class="moz-txt-link-freetext"
          href="http://bugs.sun.com/view_bug.do?bug_id=8007475">http://bugs.sun.com/view_bug.do?bug_id=8007475</a><br>
        <br>
        Thanks for sending in the patch.<br>
        Coleen<br>
        <br>
        On 1/21/2013 10:35 AM, Volker Simonis wrote:<br>
      </div>
      <blockquote
cite="mid:CA+3eh11UcWw2kLSJqnDeiPbKiUxgW=G8gUV4XELHAHfUdnYirQ@mail.gmail.com"
        type="cite">
        <div dir="ltr">
          <div>
            <div>
              <div>
                <div>
                  <div>Hi,<br>
                    <br>
                    the following debug code in
                    StackMapFrame::set_mark() writes beyond the bounds
                    of an array allocated with NEW_RESOURCE_ARRAY. This
                    immediately triggers a "memory stomping error" when
                    running with -XX:+UseMallocOnly:<br>
                    <br>
                    <span style="font-family:courier new,monospace">&gt;
                      output_64_dbg/linux_amd64_compiler2/jvmg/hotspot
                      -showversion -XX:+UseMallocOnly <span class=""></span><span
                        class=""></span>StackMapFrameTest<br>
                      <br>
                      Using java runtime at:
                      /share/software/Java/jdk1.7.0_b142/jre<br>
                      java version "1.7.0-ea"<br>
                      Java(TM) SE Runtime Environment (build
                      1.7.0-ea-b142)<br>
                      OpenJDK 64-Bit Server VM (build
                      25.0-b16-internal-jvmg, mixed mode)<br>
                      <br>
                      ## nof_mallocs = 56604, nof_frees = 43232<br>
                      ## memory stomp: byte at 0x00007f4cc81c5e20 after
                      object 0x00007f4cc81c5e18<br>
                      ### previous object (not sure if correct):
                      0x00007f4cc81c5620 (1953 bytes)<br>
                      ### next object: 0x00007f4cc81c5e58 (56 bytes)<br>
                      # To suppress the following error report, specify
                      this argument<br>
                      # after -XX: or in .hotspotrc: 
                      SuppressErrorAt=/os.cpp:551<br>
                      #<br>
                      # A fatal error has been detected by the Java
                      Runtime Environment:<br>
                      #<br>
                      #  Internal Error
                      (/share/software/Java/OpenJDK/hsx/hotspot-comp/hotspot/src/share/vm/runtime/os.cpp:551),

                      pid=22702, tid=139967890032384<br>
                      #  fatal error: memory stomping error<br>
                      #<br>
                    </span><br>
                  </div>
                  The following patch fixes the problem:<br>
                  <br>
                  <span style="font-family:courier new,monospace">diff
                    -r bf623b2d5508
                    src/share/vm/classfile/stackMapFrame.hpp<br>
                    --- a/src/share/vm/classfile/stackMapFrame.hpp  Wed
                    Jan 16 14:55:18 2013 -0800<br>
                    +++ b/src/share/vm/classfile/stackMapFrame.hpp  Mon
                    Jan 21 16:27:46 2013 +0100<br>
                    @@ -178,7 +178,7 @@<br>
                     #ifdef DEBUG<br>
                         // Put bogus type to indicate it's no longer
                    valid.<br>
                         if (_stack_mark != -1) {<br>
                    -      for (int i = _stack_mark; i &gt;=
                    _stack_size; --i) {<br>
                    +      for (int i = _stack_mark - 1; i &gt;=
                    _stack_size; --i) {<br>
                             _stack[i] = VerificationType::bogus_type();<br>
                           }<br>
                         }<br>
                  </span><br>
                </div>
                For your convenience, please find attached the small
                test case and the patch. I haven't done a JTreg test
                because the problem only occurs in the debug version of
                the VM when running with -XX:+UseMallocOnly which isn't
                a tested configuration anyway. Nevertheless I think the
                -XX:+UseMallocOnly option (which is also only available
                in the debug version of the VM) is important enough
                (i.e. very nice to hunt other memory problems) to fix
                the problem.<br>
                <br>
              </div>
              Could somebody please open a bug report for this issue
              (because I still can't and probably won't be able to until
              the end of times:) and commit the patch.<br>
              <br>
            </div>
            Thank you and best regards,<br>
          </div>
          Volker<br>
          <div>
            <div>
              <div>
                <div>
                  <div><span class=""></span><span class=""></span></div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </blockquote>
      <br>
    </blockquote>
  </body>
</html>