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
heap-use-after-free in find_maxchar_surrogates #67211
Comments
Line 27-29 trigger use-after-free. ================================================================= |
Your code is strange. It exchanges pointer between processes if I understand correctly: class Berbagi(ctypes.Structure):
_fields_ = [('a', ctypes.c_wchar_p), ('b', ctypes.c_double) ]
nilai = multiprocessing.Array(Berbagi, [Berbagi() for x in range(9)] ) You must not do that. Instead, Berbagi.a must be an array of c_wchar characters with a fixed size. Try for example: class Berbagi(ctypes.Structure):
_fields_ = [('a', ctypes.c_wchar * 10), ('b', ctypes.c_double) ] Note: I'm not sure that ctypes is the most efficient module to serialize data, but maybe you have to use ctypes for a reason not explained in your issue. The bug is in your code, not in Python. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: