Skip to content

Conversation

@kienanstewart
Copy link

The return value of clang_getClangVersion() is a CXString structure. Depending on the architecture the structure can be returned on the stack or via a register.

When assuming it is a ctypes.c_char_p, the ctypes FFI call will segfault upon return on armhf due to not properly handling how the architecture is returning the data.

Properly setting the return type for clang_getClangVersion() will avoid the segfault.

The return value of `clang_getClangVersion()` is a CXString
structure. Depending on the architecture the structure can be returned
on the stack or via a register.

When assuming it is a `ctypes.c_char_p`, the ctypes FFI call will
segfault upon return on armhf due to not properly handling how the
architecture is returning the data.

Properly setting the return type for `clang_getClangVersion()` will
avoid the segfault.

Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant