Skip to content
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

Segmentation fault running ctypes.test_slicing on Mono. #1299

Open
slozier opened this issue Sep 19, 2021 · 0 comments
Open

Segmentation fault running ctypes.test_slicing on Mono. #1299

slozier opened this issue Sep 19, 2021 · 0 comments

Comments

@slozier
Copy link
Contributor

slozier commented Sep 19, 2021

Running the following code Mono (from CPython.ctypes.test_slicing) leads to all sorts of failures (upon exiting the program?):

from ctypes import *
import _ctypes_test
s = b"abcdefghijklmnopqrstuvwxyz"

dll = CDLL(_ctypes_test.__file__)
dll.my_strdup.restype = POINTER(c_char)
dll.my_free.restype = None
res = dll.my_strdup(s)
dll.my_free(res)

Does not occur consistently. Might be some sort of marshaling issue causing a double free?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant