ASAN error in VSTMidiEventList

Anybody seen this before? I was using the AudioPluginHost and dragging up and down the keyboard.

../../../modules/juce/modules/juce_audio_processors/format_types/juce_VSTMidiEventList.h:115:45: runtime error: index 2 out of bounds for type 'Vst2::VstEvent *const[2]'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../../modules/juce/modules/juce_audio_processors/format_types/juce_VSTMidiEventList.h:115:45 in 
../../../modules/juce/modules/juce_audio_processors/format_types/juce_VSTMidiEventList.h:119:41: runtime error: index 2 out of bounds for type 'Vst2::VstEvent *const[2]'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../../modules/juce/modules/juce_audio_processors/format_types/juce_VSTMidiEventList.h:119:41 in 

I have the same:

because events->events is just an array of 2 pointers.

struct VstEvents
{
    VstInt32 numEvents;		///< number of Events in array
    VstIntPtr reserved;		///< zero (Reserved for future use)
    VstEvent* events[2];	///< event pointer array, variable size
};

perhaps that allocation code could be cleaned to avoid that?

Thanks for reporting. On develop, we’ve fixed a few UB sanitizer issues:

1 Like

Wow, you’ve been busy the last 2 days! 50+ bug fixes! :crazy_face:

Over the last week or so we’ve merged about a month’s worth of work that got backed-up due to the release. I think we’re up-to-date again now…

1 Like