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

erroneous dot file generated from Nashorn --print-code

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 9
    • core-libs

    Backports

      Description

        If an exception is raised during dot file generation, a catch message is inserted in the label of a graph node, followed by a line break. The dot processor interprets this as a string running past the EOL.

        Example (the input is the JavaScript function "var f = function(a) { return a+4 }") - there is a hard line break after the three closing asterisks:

            L2 [id=L2, label="*** CATCH: jdk/nashorn/internal/runtime/UnwarrantedOptimismException ***
            L2 [bci=8]\lframe same1 UnwarrantedOptimismException\l\l 8 iconst_2\l 9 anewarray Object\l 12 aload 0\l 13 iload 1\l 14 invokedynamic populateArray([Object;Object;I)[Object; [static 'populateArrayBootstrap']\l 19 iconst_0\l 20 invokestatic Script$Recompilation$4$8I$\^shell\_.:getString$array(I)[String;\l 23 invokestatic RewriteException.create(UnwarrantedOptimismException;[Object;[String;)RewriteException;\l 26 athrow\l"]

        Proposed solution: to make the text contained in the graph consistent with what the --print-code option outputs to the console, omit the catch message altogether.

        Attached noreg-other label as this is debugging infrastructure.

        Attachments

          Issue Links

            Activity

              People

                mhaupt Michael Haupt
                mhaupt Michael Haupt
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: