cffi-1.9.1: segmentation fault during self test on NetBSD
Created originally on Bitbucket by wiz
When running the self tests on NetBSD 8.99.1/amd64, there are segfaults:
#!python
cd /scratch/devel/py-cffi/work/cffi-1.10.0 && py.test-3.6 -v
============================================================================ test session starts =============================================================================
platform netbsd8 -- Python 3.6.1, pytest-3.1.2, py-1.4.33, pluggy-0.4.0 -- /usr/pkg/bin/python3.6
cachedir: .cache
rootdir: /scratch/devel/py-cffi/work/cffi-1.10.0, inifile:
collected 1927 items
c/test_c.py::test_load_library PASSED
c/test_c.py::test_all_rtld_symbols PASSED
c/test_c.py::test_new_primitive_type PASSED
c/test_c.py::test_inspect_primitive_type PASSED
c/test_c.py::test_cast_to_signed_char PASSED
c/test_c.py::test_sizeof_type PASSED
c/test_c.py::test_integer_types PASSED
c/test_c.py::test_no_float_on_int_types PASSED
c/test_c.py::test_float_types PASSED
c/test_c.py::test_complex_types SKIPPED
c/test_c.py::test_character_type PASSED
c/test_c.py::test_pointer_type PASSED
c/test_c.py::test_inspect_pointer_type PASSED
c/test_c.py::test_pointer_to_int PASSED
c/test_c.py::test_pointer_bool PASSED
c/test_c.py::test_pointer_to_pointer PASSED
c/test_c.py::test_reading_pointer_to_int PASSED
c/test_c.py::test_reading_pointer_to_float PASSED
c/test_c.py::test_cast_float_to_int PASSED
c/test_c.py::test_newp_integer_types PASSED
c/test_c.py::test_reading_pointer_to_char PASSED
c/test_c.py::test_reading_pointer_to_pointer PASSED
c/test_c.py::test_load_standard_library PASSED
c/test_c.py::test_no_len_on_nonarray PASSED
c/test_c.py::test_cmp_none PASSED
c/test_c.py::test_invalid_indexing PASSED
c/test_c.py::test_default_str PASSED
c/test_c.py::test_default_unicode PASSED
c/test_c.py::test_cast_from_cdataint PASSED
c/test_c.py::test_void_type PASSED
c/test_c.py::test_array_type PASSED
c/test_c.py::test_inspect_array_type PASSED
c/test_c.py::test_array_instance PASSED
c/test_c.py::test_array_of_unknown_length_instance PASSED
c/test_c.py::test_array_of_unknown_length_instance_with_initializer PASSED
c/test_c.py::test_array_initializer PASSED
c/test_c.py::test_array_add PASSED
c/test_c.py::test_array_sub PASSED
c/test_c.py::test_ptr_sub_unaligned PASSED
c/test_c.py::test_cast_primitive_from_cdata PASSED
c/test_c.py::test_new_primitive_from_cdata PASSED
c/test_c.py::test_cast_between_pointers PASSED
c/test_c.py::test_alignof PASSED
c/test_c.py::test_new_struct_type PASSED
c/test_c.py::test_new_union_type PASSED
c/test_c.py::test_complete_struct PASSED
c/test_c.py::test_complete_union PASSED
c/test_c.py::test_struct_instance PASSED
c/test_c.py::test_union_instance PASSED
c/test_c.py::test_struct_pointer PASSED
c/test_c.py::test_struct_init_list PASSED
c/test_c.py::test_array_in_struct PASSED
c/test_c.py::test_offsetof PASSED
c/test_c.py::test_function_type PASSED
c/test_c.py::test_inspect_function_type PASSED
c/test_c.py::test_function_type_taking_struct PASSED
c/test_c.py::test_function_void_result PASSED
c/test_c.py::test_function_void_arg PASSED
c/test_c.py::test_call_function_0 PASSED
c/test_c.py::test_call_function_0_pretend_bool_result PASSED
c/test_c.py::test_call_function_1 PASSED
c/test_c.py::test_call_function_2 PASSED
c/test_c.py::test_call_function_3 PASSED
c/test_c.py::test_call_function_4 PASSED
c/test_c.py::test_call_function_5 PASSED
c/test_c.py::test_call_function_6 PASSED
c/test_c.py::test_call_function_7 PASSED
c/test_c.py::test_call_function_20 PASSED
c/test_c.py::test_call_function_21 PASSED
c/test_c.py::test_call_function_22 PASSED
c/test_c.py::test_call_function_23 PASSED
c/test_c.py::test_call_function_23_bis PASSED
c/test_c.py::test_call_function_23_bool_array PASSED
c/test_c.py::test_cannot_pass_struct_with_array_of_length_0 PASSED
c/test_c.py::test_call_function_9 PASSED
c/test_c.py::test_cannot_call_with_a_autocompleted_struct PASSED
c/test_c.py::test_new_charp PASSED
c/test_c.py::test_load_and_call_function PASSED
c/test_c.py::test_read_variable SKIPPED
c/test_c.py::test_read_variable_as_unknown_length_array SKIPPED
c/test_c.py::test_write_variable SKIPPED
c/test_c.py::test_callback [1] Segmentation fault (core dumped) py.test-3.6 -v
*** Error code 139
In total, I have to disable the following tests so that I see now core dumps:
py.test-3.6 -v -k "not test_callback and not test_a_lot_of_callbacks
and not test_wchar and not test_errno_callback and not
test_functionptr_simple and not test_functionptr_voidptr_return and
not test_functionptr_intptr_return and not
test_functionptr_void_return and not test_cast_functionptr_and_int and
not test_structptr_argument and not test_array_argument_as_list and
not test_array_of_func_ptr and not test_function_pointer and not
test_access_callback and not test_win32_calling_convention_0 and not
test_ffi_callback and not test_array_length_from_constant and not
test_some_integer_type_for_issue73"
This gives me:
<<<moved 3.6MB of output to dump.txt>>>
This is not the same as #303 (closed); due to changes in NetBSD and libffi in pkgsrc, all self tests for libffi now pass successfully.
Let me know which of the other self tests failures need their own bug reports. Thanks!