-
Notifications
You must be signed in to change notification settings - Fork 23
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
crashes in buffer_reference and buffer_lock #173
Comments
It looks like both of these bugs are related to how buffer ref hijacks the owner object's 'notify' method. In the first one, the buffer object holds the 'notify' message, so when it is deallocated it deletes that message object, but there are still callbacks that are dispatched to that message, so its an access after delete issue. In the second one, each buffer allocation creates its own 'notify' message, but it looks like only the last one actually gets used, if you create a Maybe buffer references in |
buffer_reference registers the 'notify' method for its owning object. @tap has a branch that makes this message registration for buffer_reference optional.. and that solves bug 1 above, but then the references aren't aware if they're bound or unbound so you get crashes deallocating buffers in max while your owner exists. |
checkout and build https://github.com/Cycling74/min-devkit/tree/xnor/buffer-bugs
Debug build makes sense
bug 1
min.buffer.cons~
bug 2
buffer~ test1 1000
min.buffer.lck~ test1
buffer~
object.. crashThe text was updated successfully, but these errors were encountered: