RFR: 8350813: Rendering of bulky sound bank from MIDI sequence can cause OutOfMemoryError
Alexander Zvegintsev
azvegint at openjdk.org
Thu Feb 27 01:37:58 UTC 2025
On Wed, 26 Feb 2025 22:26:48 GMT, Alexander Zuev <kizune at openjdk.org> wrote:
> - Check that the calculated audio data size does not exceed available heap memory before committing to the rendering
> - Add a test case
test/jdk/javax/sound/midi/BulkSoundBank/BulkSoundBank.java line 33:
> 31: * @bug 8350813
> 32: * @summary Rendering of bulky sound bank from MIDI sequence can cause OutOfMemoryError.
> 33: * @run main/othervm -Xmx1g BulkSoundBank
The test can still throw OOME with `@run main/othervm -Xmx2g BulkSoundBank` after the fix. (Tested on Ubuntu 22.04)
So it looks like the condition when we throw the `InvalidMidiDataException` should be tuned.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23814#discussion_r1972667485
More information about the client-libs-dev
mailing list