jdk
jdk copied to clipboard
8282578: AIOOBE in javax.sound.sampled.Clip
Add try/catch clause to ignore an exception since it is harmless for we isolated the massge data before passing it ro processor. Add test case.
Progress
- [x] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
Issue
- JDK-8282578: AIOOBE in javax.sound.sampled.Clip
Reviewers
- Phil Race (@prrace - Reviewer)
- Alexey Ivanov (@aivanov-jdk - Reviewer)
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9016/head:pull/9016
$ git checkout pull/9016
Update a local copy of the PR:
$ git checkout pull/9016
$ git pull https://git.openjdk.org/jdk pull/9016/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 9016
View PR using the GUI difftool:
$ git pr show -t 9016
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9016.diff
:wave: Welcome back kizune! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.
@azuev-java The following label will be automatically applied to this pull request:
client
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.
Webrevs
- 03: Full - Incremental (64868838)
- 02: Full - Incremental (85c27f6f)
- 01: Full - Incremental (f2ff2d14)
- 00: Full (d085cfb1)
@azvegint @prrace please review
Probably it is better to check the data length for each sys message and discard it if the data is too small? Ignoring all possible AIOOBE from this large method which calls many other large methods from SoftVoice/SoftTuning may hide some other bugs.
@azuev-java This change now passes all automated pre-integration checks.
ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.
After integration, the commit message for the final commit will be:
8282578: AIOOBE in javax.sound.sampled.Clip
Reviewed-by: prr, aivanov, azvegint
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.
At the time when this comment was updated there had been 201 new commits pushed to the master branch:
- 8b69a2e434ad2fa3369079622b57afb973d5bd9a: 8298099: [JVMCI] decouple libgraal from JVMCI module at runtime
- 8a9911ef1762ae837e427ec9d91b1399ba33b6e4: 8295803: Console should be usable in jshell and other environments
- 5d4c71c8bd361af78c90777f17b79e95d8eb5afe: 8281236: (D)TLS key exchange named groups
- 10356e767a44632c5de142d4666bd85d4618bf71: 8298303: (fs) temporarily remove Path.getExtension
- 3b8c7ef8e705764942c4f3df872e3e47021a37f4: 8157023: Integrate NMT with JFR
- e86f31b5e71af00fea9cd989a86c1e75e3df1821: 8298301: C2: assert(main_cmp->in(2)->Opcode() == Op_Opaque1) failed: main loop has no opaque node?
- 8edb98df3dd393103f2c80e929b011bc6b7993a3: 8165943: LineBreakMeasurer does not measure correctly if TextAttribute.TRACKING is set.
- 39344840c7a5fbd37f6c6a972a89c3600396e878: 8298205: Prefer Member Initialization Lists for JFR classes in os_perf.hpp
- 389b8f4b788375821a8bb4b017e50f905abdad2d: 8297298: SequenceInputStream should override transferTo
- dd7385d1e86afe8af79587e80c5046af5c84b5cd: 8298202: [AIX] Dead code elimination removed jfr constructor used by AIX
- ... and 191 more: https://git.openjdk.org/jdk/compare/105d9d75e84a46400f52fafda2ea00c99c14eaf0...master
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.
Probably it is better to check the data length for each sys message and discard it if the data is too small? Ignoring all possible AIOOBE from this large method which calls many other large methods from SoftVoice/SoftTuning may hide some other bugs.
No, because determining the correct length of the message will require basically to parse it all, the correct length could be a 2 bytes or hundreds of bytes - in order to determine we have to process the message completely.
No, because determining the correct length of the message will require basically to parse it all, the correct length could be a 2 bytes or hundreds of bytes - in order to determine we have to process the message completely.
There are 64 usages of data in that method most of them use constants like 1/2/3 and other usages are in the loops, both can be easily checked. There is also code like int[] destinations = new int[(data.length - 7) / 2]; which could cause the NegativeArrayException, or probably some others. It s better to check the out of bands access before access than to have a try/catch block for 300 lines of code.
@azuev-java This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!
pre submit tests failed*
@azuev-java This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!
@azuev-java This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the /open pull request command.
Just uploaded the new version with proper length analysis so would be thankful for the continuation of the review.
/open
@azuev-java This pull request is now open
@azvegint Can you please take a look?
/integrate
Going to push as commit af8fb7eef7188ef762399cfb3faf5c8afd49efa7.
Since your change was applied there have been 201 commits pushed to the master branch:
- 8b69a2e434ad2fa3369079622b57afb973d5bd9a: 8298099: [JVMCI] decouple libgraal from JVMCI module at runtime
- 8a9911ef1762ae837e427ec9d91b1399ba33b6e4: 8295803: Console should be usable in jshell and other environments
- 5d4c71c8bd361af78c90777f17b79e95d8eb5afe: 8281236: (D)TLS key exchange named groups
- 10356e767a44632c5de142d4666bd85d4618bf71: 8298303: (fs) temporarily remove Path.getExtension
- 3b8c7ef8e705764942c4f3df872e3e47021a37f4: 8157023: Integrate NMT with JFR
- e86f31b5e71af00fea9cd989a86c1e75e3df1821: 8298301: C2: assert(main_cmp->in(2)->Opcode() == Op_Opaque1) failed: main loop has no opaque node?
- 8edb98df3dd393103f2c80e929b011bc6b7993a3: 8165943: LineBreakMeasurer does not measure correctly if TextAttribute.TRACKING is set.
- 39344840c7a5fbd37f6c6a972a89c3600396e878: 8298205: Prefer Member Initialization Lists for JFR classes in os_perf.hpp
- 389b8f4b788375821a8bb4b017e50f905abdad2d: 8297298: SequenceInputStream should override transferTo
- dd7385d1e86afe8af79587e80c5046af5c84b5cd: 8298202: [AIX] Dead code elimination removed jfr constructor used by AIX
- ... and 191 more: https://git.openjdk.org/jdk/compare/105d9d75e84a46400f52fafda2ea00c99c14eaf0...master
Your commit was automatically rebased without conflicts.
@azuev-java Pushed as commit af8fb7eef7188ef762399cfb3faf5c8afd49efa7.
:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.
Thank you for removing that large try/catch block. Looks much better.
Thank you for removing that large try/catch block. Looks much better.
I agree, the code is clearer now.
I started reviewing the updated code but I haven't finished it. It's integrated now.