RFR: 8074211: javax.sound.midi: Error with send System Exclusive messages of different length [v3]
Alec Su
duke at openjdk.org
Tue Nov 7 16:22:01 UTC 2023
On Mon, 6 Nov 2023 21:43:24 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> test/jdk/javax/sound/midi/Devices/OutputBuffer.java line 33:
>>
>>> 31: * is sent again with the next sysex message
>>> 32: * @comment This test does not fail when the bug occurs. It requires manual
>>> 33: * monitoring of the output.
>>
>> The fix seems reasonable. but this test comment is odd. I'm not sure I understand what you can mean by manual monitoring of the output. The test doesn't seem useful unless it can detect failure.
>
> The test is useful since that is the only test that touches the code path when the buffer for the midi message is reused and the bug can be reproduced. at least it doesn't crash.
Actually I noticed the bug when I was working on https://github.com/openjdk/jdk/pull/16477. The testcase I added in the PR also triggered the bug. However, the testcase crashes JVM before triggering the bug, so I use another testcase for this PR.
The test case sends the folloing three pieces of sysex message
F0 7D 01 02
F7 03 04
F7 05 06 07 F7
The expected message received should be the following
F0 7D 01 02 03 04 05 06 07 F7
But the acual message received is
F0 7D 01 02 03 04 01 02 05 06 07 F7
Therefore, I'm not sure whether it's better to remove the testcase in this PR or keep it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16399#discussion_r1385189461
More information about the client-libs-dev
mailing list