On Wed, 8 Nov 2023 03:36:04 GMT, Alec Su <[email protected]> wrote:
>> The bug on Windows doesn't generate any error messages. During the testcase
>> run, every "Open MIDI port" message should be followed by an "All
>> SysexMessage sent" message. Alternatively, you can check `%ERRORLEVEL%` to
>> determine if there's an error when JVM exits.
>>
>> On Linux, there are no software MIDI devices provided by default. To
>> reproduce this bug on Linux, you need to connect a real MIDI device to Linux
>> or create a virtual MIDI device by running the command `sudo modprobe
>> snd_virmidi midi_devs=1`.
>>
>> The bug occurred because a pointer was increased on Line 137, then it
>> attempted to release the modified pointer on Line 143.
>>
>> https://github.com/openjdk/jdk/blob/e9d19d0fffc47119d0d4f756833ec87cd0a6331e/src/java.desktop/share/native/libjsound/MidiOutDevice.c#L128-L144
>>
>> To fix this, I added a variable `msg` to store the modified pointer to
>> prevent `data` pointer being modified.
>
> Alec Su has updated the pull request incrementally with one additional commit
> since the last revision:
>
> Remove JDK-8319315
test/jdk/javax/sound/midi/SysexMessage/SendRawSysexMessage.java line 126:
> 124: r.send(new SysexMessage(new byte[]{
> 125: (byte) SPECIAL_SYSTEM_EXCLUSIVE, 0x05, 0x06, 0x07
> 126: (byte) SPECIAL_SYSTEM_EXCLUSIVE}, 4), -1);
comma is missed?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16477#discussion_r1387239267