-
Notifications
You must be signed in to change notification settings - Fork 474
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_audio_cvt crash on Windows bundled release #1096
Comments
Commenting out the call the In fact, the whole thing works correctly for me if I simply add |
From the docs of This error doesn't happen on Linux, so this logic must be different depending on the OS we use (which makes sense because audio systems are deeply tied to the OS), which would be why it hasn't been caught until now. So the solution here would be to change how the buffer sent to |
This commit rewrites AudioCVT::convert to bounce the audio buffer into a an SDL2 heap allocation, rather than trying to reuse the rust heap buffer. This is critical, as the underlying library warns internally that the buffer may be reallocated, breaking configurations where the library is not using the same heap as rust. The underlying implementation also notes that the underlying buffer may be transparently resized to larger than the output as part of the transformations, so relying on the buffer being capacity() bytes long to ensure the buffer is not re-allocated is a broken assumption. Closes Rust-SDL2#1096
This commit rewrites AudioCVT::convert to bounce the audio buffer into a an SDL2 heap allocation, rather than trying to reuse the rust heap buffer. This is critical, as the underlying library warns internally that the buffer may be reallocated, breaking configurations where the library is not using the same heap as rust. The underlying implementation also notes that the underlying buffer may be transparently resized to larger than the output as part of the transformations, so relying on the buffer being capacity() bytes long to ensure the buffer is not re-allocated is a broken assumption. Closes Rust-SDL2#1096
test_audio_cvt is crashing on Windows bundled dynamic build with heap corruption:
The text was updated successfully, but these errors were encountered: