midir icon indicating copy to clipboard operation
midir copied to clipboard

Current version of openmidi dependency has Undefined Behaviour on MacOS

Open marcushaddon opened this issue 1 year ago • 3 comments

When using midir on MacOS with coremidi, i inevitably get panics related to misaligned pointer dereference: address must be a multiple of 0x4 but is 0x7000115af679, which originate inside of coremidi. Looking at their issues, it seems that this was a known issue that has been fixed (https://github.com/chris-zen/coremidi/issues/24). The fix is available in 0.7.0 but midir still depends on 0.6.0, and will not accept a [patch]'ed version.

Would it be possible to upgrade to coremidi = 0.7.0?

marcushaddon avatar Oct 26 '23 20:10 marcushaddon

Can you test if #139 fixes it? I don't have a macOS machine right now to test it, but according to CI looks good. I'm a little confused because the linked issue doesn't mention anything about misaligned addresses (only MaybeUninit and null pointers), so I'm curious to see if it actually helps with your issue.

Boddlnagg avatar Oct 27 '23 17:10 Boddlnagg

I just released midir 0.10.0 which now depends on coremidi 0.8.0

Boddlnagg avatar Apr 21 '24 13:04 Boddlnagg

I actually don't think that this was fixed by coremidi 0.7, but probably https://github.com/chris-zen/coremidi/issues/49 instead

Boddlnagg avatar May 09 '24 17:05 Boddlnagg

This should be fixed with the latest version of coremidi-sys. I will publish a version with updated dependency soon.

Boddlnagg avatar Jun 11 '24 11:06 Boddlnagg

Actually a new version is not needed (and coremidi-sys is not even a direct dependency of midir). cargo update should do the trick.

Boddlnagg avatar Jun 27 '24 17:06 Boddlnagg