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

[jittester] Disable downcasts by default

XMLWordPrintable

    • b21

        Currently, JITTester's love to downcast often produces something like this:

        ArrayList<Integer> someVar = (TreeSet)(Object)(List)(new ArrayList<Integer>());

        ... which is possible because it goes up to Object and then starts downcasting to some totally unrelated class / type.

        Considering the JITTester's love to casts (they are more-or-less 'safe' expressions), it means a high probability (30-50%) of a gentest to fail compilation. Even worse is the situation for ByteCode tests - that they're faulty is only recognized during the run phase.

        I suggest to disable the downcasts.


        Failure mode: stderr is non empty:
         ===== Test_954.BASIC.err ====
        1d0
        < Java HotSpot(TM) 64-Bit Server VM warning: outputStream::do_vsnprintf output truncated -- buffer length is 2000 bytes but 22852 bytes are needed.

              enikitin Evgeny Nikitin
              enikitin Evgeny Nikitin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: