Undefined behaviour sanitizer warning for MIDI processing

Hi, getting this runtime error whilst trying to track down an issue and not sure whether this is something that I can ignore or not:

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /Users/lee/dev/JUCE/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm:1865:16 in

/Users/lee/dev/JUCE/modules/juce_audio_plugin_client/AU/juce_AU_Wrapper.mm:1865:16: runtime error: store to misaligned address 0x61d0003c5091 for type ‘MIDITimeStamp’ (aka ‘unsigned long long’), which requires 4 byte alignment

0x61d0003c5091: note: pointer points here



It looks like this is an issue with MIDIPacketNext() returning a misaligned pointer to the next MIDI event. From some cursory googling it seems that this a known issue in macOS and not something we can fix on our end.

1 Like