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

Some sound tests rarely hangs because of incorrect synchronization

XMLWordPrintable

    • b124
    • generic
    • generic

        I just found one of the reason why some of our tests hangs. Example of the test:
        closed/javax/sound/sampled/Clip/bug5070081.java

        The problem is that the tests uses this pattern:
        clip.start();
        while(clip.isRunning());

        The status running or not is updated on a different thread, but our clip implementations lack of synchronization of getters and the hotspot inline such methods to while(true).

              serb Sergey Bylokhov
              serb Sergey Bylokhov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: