Tracktion / tracktion_engine

Tracktion Engine module
Other
1.11k stars 148 forks source link

[Bug]: Fix memory corruption in LoopingMidiNode clipSequenceToRange #178

Closed drowaudio closed 1 year ago

drowaudio commented 1 year ago

Detailed steps on how to reproduce the bug

If a sequence has multiple overlapping notes, the note-off-map can be invalidated as sequence events are removed. This means note-off indicies can erase the wrong notes after some have been removed. This may need to be run with Asan to trigger.

What is the expected behaviour?

No memory corruption.

Unit test to reproduce the error?

No response

Operating systems

Other

What versions of the operating systems?

All

Architectures

Other

Stacktrace

No response

Plug-in formats (if applicable)

No response

Plug-in host applications (DAWs) (if applicable)

No response

Testing on the develop branch

The bug is present on the develop branch

Code of Conduct

drowaudio commented 1 year ago

https://github.com/Tracktion/tracktion_engine/commit/7e2ff04733f021bbbe92f00524210ac4127d7d43