You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting heap corruption when passing Vector arguments to functions called by simpleRPC.
Setting Vector.destroy = false in function void _read(Vector *data) in read.tcc appears to fix the problem, although this may (will?) result in a memory leak.
This is probably because the vector is made (and should be destroyed) outside of the function send_Vector(). By passing the vector as is, the destructor is called when the function ends, the calling function will additionally call the destructor, which leads to undefined behaviour.
My guess is that by passing the vector by reference solves the problem, i.e.,
I'm getting heap corruption when passing Vector arguments to functions called by simpleRPC.
Setting Vector.destroy = false in function void _read(Vector *data) in read.tcc appears to fix the problem, although this may (will?) result in a memory leak.
Test code (snippet):
The text was updated successfully, but these errors were encountered: