Integrated: 8301310: The SendRawSysexMessage test may cause a JVM crash

Alec Su duke at openjdk.org
Tue Nov 14 22:54:39 UTC 2023


On Thu, 2 Nov 2023 13:55:41 GMT, Alec Su <duke at openjdk.org> 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.

This pull request has now been integrated.

Changeset: d725b73d
Author:    Alec Su <ae40515 at yahoo.com.tw>
Committer: Sergey Bylokhov <serb at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/d725b73df01ae4478dfaabc47c48cd7231d91afa
Stats:     19 lines in 2 files changed: 13 ins; 0 del; 6 mod

8301310: The SendRawSysexMessage test may cause a JVM crash

Reviewed-by: serb

-------------

PR: https://git.openjdk.org/jdk/pull/16477


More information about the client-libs-dev mailing list