Skip to content

Commit

Permalink
8269091: javax/sound/sampled/Clip/SetPositionHang.java failed with Ar…
Browse files Browse the repository at this point in the history
…rayIndexOutOfBoundsException: Array index out of range: -4

Backport-of: 1a7b70a8be0a236b98925a8320d25d88a405d595
  • Loading branch information
MBaesken committed Jun 13, 2023
1 parent ef86ea2 commit b6a5d20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -1297,8 +1297,9 @@ public void run() {
}
}
while (doIO && thread == curThread) {
if (newFramePosition >= 0) {
clipBytePosition = newFramePosition * frameSize;
int npf = newFramePosition; // copy into local variable
if (npf >= 0) {
clipBytePosition = npf * frameSize;
newFramePosition = -1;
}
int endFrame = getFrameLength() - 1;
Expand Down
2 changes: 1 addition & 1 deletion test/jdk/javax/sound/sampled/Clip/SetPositionHang.java
Expand Up @@ -28,7 +28,7 @@

/**
* @test
* @bug 8266421
* @bug 8266421 8269091
* @summary Tests that Clip.setFramePosition/setMicrosecondPosition do not hang.
*/
public final class SetPositionHang implements Runnable {
Expand Down

3 comments on commit b6a5d20

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RealCLanger
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk11u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on b6a5d20 Aug 7, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RealCLanger the backport was successfully created on the branch RealCLanger-backport-b6a5d208 in my personal fork of openjdk/jdk11u-dev. To create a pull request with this backport targeting openjdk/jdk11u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit b6a5d208 from the openjdk/jdk17u-dev repository.

The commit being backported was authored by Matthias Baesken on 13 Jun 2023 and had no reviewers.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk11u-dev:

$ git fetch https://github.com/openjdk-bots/jdk11u-dev.git RealCLanger-backport-b6a5d208:RealCLanger-backport-b6a5d208
$ git checkout RealCLanger-backport-b6a5d208
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk11u-dev.git RealCLanger-backport-b6a5d208

Please sign in to comment.