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

gh-111178: fix some USAN failures #123004

Merged
merged 4 commits into from
Sep 27, 2024

Conversation

picnixz
Copy link
Member

@picnixz picnixz commented Aug 14, 2024

This is a PRI used to track all possible errors since the build bot needs to be incrementally fixed. Depending on the number of commits, I'll make separate PRs (and have the buildbot fails until the last one is merged).

@picnixz
Copy link
Member Author

picnixz commented Aug 14, 2024

!buildbot Usan

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @picnixz for commit cc28b38 🤖

The command will test the builders whose names match following regular expression: Usan

The builders matched are:

  • AMD64 Arch Linux Usan PR

@picnixz
Copy link
Member Author

picnixz commented Aug 14, 2024

Perfect, I actually can experiment myself @encukou I'll be checking this PR instead of the other and will decide after I've fixed the errors one by one...

@picnixz
Copy link
Member Author

picnixz commented Aug 14, 2024

!buildbot Usan

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @picnixz for commit e29710f 🤖

The command will test the builders whose names match following regular expression: Usan

The builders matched are:

  • AMD64 Arch Linux Usan PR

@picnixz picnixz marked this pull request as draft August 14, 2024 09:17
@picnixz
Copy link
Member Author

picnixz commented Aug 14, 2024

@encukou I'm able to run the build bot (in response to your previous question) and I'm currently setting a local one. Actually, what I don't understand is that my own Clang version does not complain about it... I'm not sure if it's because it's too old so I'm just setting up an Arch Linux container to check.

@encukou
Copy link
Member

encukou commented Aug 14, 2024

Ah, just got to this notification.

According to the issue, -fsanitize=function for C is new (and included in -fsanitize=undefined) in LLVM/clang 17.

@picnixz
Copy link
Member Author

picnixz commented Aug 14, 2024

Yes. I looked around more and was able to confirm this. So, I used the following configuration:

./configure --prefix '$(PWD)/target' CC=clang LD=clang CFLAGS="-fsanitize-recover -fsanitize=function" LDFLAGS="-fsanitize=function -fsanitize-recover"

Note that I used -fsanitize-recover to avoid early exiting and here are the errors that will need to be patched. How do you suggest we should split the tasks? one PR per module? I think we could ignore those in Python/generated_cases.c.h for now (I wouldn't really know whether Py_INCREF is a false positive or not in this case for instance, and note that the instance to fix is a specific one; it's not all occurrences of Py_INCREF).

  • In Include/internal/pycore_call.h
    • range_vectorcall
  • In Include/internal/pycore_object.h
    • PyObject_Free
  • In Objects/abstract.c
    • bytearray_ass_subscript
    • bytearray_iconcat
    • bytearray_releasebuffer
    • bytes_buffer_getbuffer
    • bytes_repeat
    • long_add
    • long_invert
    • long_mul
    • long_neg
    • set_ior
    • set_iter
    • set_len
    • setiter_iternext
    • tupleconcat
    • tuplecontains
    • tupleitem
    • tuplelength
    • tuplesubscript
  • In Objects/call.c
    • lru_cache_call
    • partial_call
  • In Objects/descrobject.c
    • Py_INCREF
    • _io_FileIO_close
    • bytes_decode
    • dict_items_impl
    • dict_pop
    • func_get_name
    • func_set_name
    • rlock_acquire
    • rlock_release
  • In Objects/listobject.c
    • gen_iternext
  • In Objects/methodobject.c
    • _io_FileIO_readall
    • dict_fromkeys
    • generic_init_subclass
    • int_from_bytes
    • lock_PyThread_release_lock
    • type___subclasscheck__
  • In Objects/moduleobject.c
    • locale_free
  • In Objects/object.c
    • _PyObject_GC_UNTRACK
    • _Py_module_getattro
    • bytes_hash
    • bytes_richcompare
    • long_bool
    • set_len
    • tuplelength
  • In Objects/typeobject.c
    • AttributeError_init
    • ImportError_dealloc
    • tupletraverse
  • In Python/bltinmodule.c
    • gen_iternext
    • reversed_next
    • unicode_ascii_iter_next
  • In Python/ceval.c
    • _PyObject_GC_UNTRACK
    • func_dealloc
    • tupledealloc
  • In Python/gc.c
    • func_clear
    • gc_traverse
    • meth_traverse
  • In Python/generated_cases.c.h
    • AttributeError_dealloc
    • PyObject_Free
    • Py_INCREF
    • _PyObject_GC_UNTRACK
    • bytearray_dealloc
    • bytes_decode
    • dict_pop
    • func_dealloc
    • gen_dealloc
    • list_extend
    • map_dealloc
    • match_dealloc
    • meth_dealloc
    • method_dealloc
    • partial_dealloc
    • range_dealloc
    • range_vectorcall
    • set_dealloc
    • set_pop
    • structseq_dealloc
    • tupledealloc
    • typevar_typing_prepare_subst
    • unicode_ascii_iter_next
  • In Python/hashtable.c
    • del_extensions_cache_value
  • In Python/lock.c
    • init_types
Command to generate the above report
make -j12 2>&1 >/dev/null | \
	grep 'runtime error: call to function' | \
	sed -r 's#^([^:]+).+: runtime error: call to function (.+) through pointer to.*#`\1`@`\2`#' | \
	sort -k1,2 -t@ -u | \
	gawk 'BEGIN { PROCINFO["sorted_in"]="@ind_num_asc"; FS=SUBSEP="@"}{A[$1][length(A[$1])+1]=$2 }END {for (m in A) { for (i in A[m]) { if (i == 1) print "- [ ] In", m; print "  - [ ]", A[m][i] }}}'
Full error report
Objects/object.c:2892:5: runtime error: call to function _PyObject_GC_UNTRACK through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/./Include/internal/pycore_object.h:447:23: note: _PyObject_GC_UNTRACK defined here
Python/gc.c:550:16: runtime error: call to function meth_traverse through pointer to incorrect function type 'int (*)(struct _object *, int (*)(struct _object *, void *), void *)'
/home/cpython/Objects/methodobject.c:248: note: meth_traverse defined here
Python/gc.c:667:20: runtime error: call to function gc_traverse through pointer to incorrect function type 'int (*)(struct _object *, int (*)(struct _object *, void *), void *)'
/home/cpython/Objects/weakrefobject.c:149: note: gc_traverse defined here
Python/generated_cases.c.h:941:21: runtime error: call to function func_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/funcobject.c:1046: note: func_dealloc defined here
Python/generated_cases.c.h:939:17: runtime error: call to function meth_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/methodobject.c:160: note: meth_dealloc defined here
Objects/descrobject.c:193:16: runtime error: call to function func_get_name through pointer to incorrect function type 'struct _object *(*)(struct _object *, void *)'
/home/cpython/Objects/funcobject.c:669:12: note: func_get_name defined here
Objects/descrobject.c:249:16: runtime error: call to function func_set_name through pointer to incorrect function type 'int (*)(struct _object *, struct _object *, void *)'
/home/cpython/Objects/funcobject.c:674: note: func_set_name defined here
Python/generated_cases.c.h:3397:21: runtime error: call to function _PyObject_GC_UNTRACK through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/./Include/internal/pycore_object.h:447:23: note: _PyObject_GC_UNTRACK defined here
Python/ceval.c:619:5: runtime error: call to function func_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/funcobject.c:1046: note: func_dealloc defined here
Objects/object.c:1216:18: runtime error: call to function _Py_module_getattro through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/Objects/moduleobject.c:1067:12: note: _Py_module_getattro defined here
Objects/descrobject.c:447:24: runtime error: call to function dict_items_impl through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/Objects/dictobject.c:6453:12: note: dict_items_impl defined here
Python/ceval.c:2120:13: runtime error: call to function _PyObject_GC_UNTRACK through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/./Include/internal/pycore_object.h:447:23: note: _PyObject_GC_UNTRACK defined here
Objects/abstract.c:2239:19: runtime error: call to function tuplecontains through pointer to incorrect function type 'int (*)(struct _object *, struct _object *)'
/home/cpython/Objects/tupleobject.c:352: note: tuplecontains defined here
Objects/typeobject.c:2190:19: runtime error: call to function AttributeError_init through pointer to incorrect function type 'int (*)(struct _object *, struct _object *, struct _object *)'
/home/cpython/Objects/exceptions.c:2308: note: AttributeError_init defined here
Python/generated_cases.c.h:5650:13: runtime error: call to function AttributeError_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/exceptions.c:2344: note: AttributeError_dealloc defined here
Objects/abstract.c:158:26: runtime error: call to function tuplesubscript through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/Objects/tupleobject.c:785: note: tuplesubscript defined here
Python/generated_cases.c.h:429:17: runtime error: call to function tupledealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:185: note: tupledealloc defined here
Python/generated_cases.c.h:619:13: runtime error: call to function tupledealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:185: note: tupledealloc defined here
Python/generated_cases.c.h:864:21: runtime error: call to function method_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/classobject.c:239: note: method_dealloc defined here
Objects/descrobject.c:401:24: runtime error: call to function dict_pop through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *const *, long)'
/home/cpython/Objects/clinic/dictobject.c.h:179: note: dict_pop defined here
Objects/object.c:1856:15: runtime error: call to function long_bool through pointer to incorrect function type 'int (*)(struct _object *)'
/home/cpython/Objects/longobject.c:5215:13: note: long_bool defined here
Python/generated_cases.c.h:1166:17: runtime error: call to function method_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/classobject.c:239: note: method_dealloc defined here
Python/generated_cases.c.h:1056:17: runtime error: call to function method_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/classobject.c:239: note: method_dealloc defined here
Python/generated_cases.c.h:1898:35: runtime error: call to function dict_pop through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *const *, long)'
/home/cpython/Objects/clinic/dictobject.c.h:179: note: dict_pop defined here
Objects/descrobject.c:475:24: runtime error: call to function Py_INCREF through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/./Include/refcount.h:241:30: note: Py_INCREF defined here
Include/internal/pycore_object.h:213:9: runtime error: call to function PyObject_Free through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/obmalloc.c:1332: note: PyObject_Free defined here
Python/generated_cases.c.h:2499:13: runtime error: call to function tupledealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:185: note: tupledealloc defined here
Python/generated_cases.c.h:3395:25: runtime error: call to function tupledealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:185: note: tupledealloc defined here
Python/ceval.c:1787:5: runtime error: call to function tupledealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:185: note: tupledealloc defined here
Python/bltinmodule.c:372:16: runtime error: call to function gen_iternext through pointer to incorrect function type 'struct _object *(*)(struct _object *)'
/home/cpython/Objects/genobject.c:586: note: gen_iternext defined here
Objects/descrobject.c:358:14: runtime error: call to function rlock_acquire through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *, struct _object *)'
/home/cpython/./Modules/_threadmodule.c:1033: note: rlock_acquire defined here
Objects/descrobject.c:324:24: runtime error: call to function rlock_release through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/./Modules/_threadmodule.c:1090: note: rlock_release defined here
Objects/object.c:1862:15: runtime error: call to function set_len through pointer to incorrect function type 'long (*)(struct _object *)'
/home/cpython/Objects/setobject.c:574:12: note: set_len defined here
Python/generated_cases.c.h:6458:13: runtime error: call to function method_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/classobject.c:239: note: method_dealloc defined here
Python/generated_cases.c.h:6937:17: runtime error: call to function tupledealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:185: note: tupledealloc defined here
Objects/abstract.c:2822:25: runtime error: call to function set_iter through pointer to incorrect function type 'struct _object *(*)(struct _object *)'
/home/cpython/Objects/setobject.c:916: note: set_iter defined here
Objects/abstract.c:63:26: runtime error: call to function set_len through pointer to incorrect function type 'long (*)(struct _object *)'
/home/cpython/Objects/setobject.c:574:12: note: set_len defined here
Objects/abstract.c:2874:18: runtime error: call to function setiter_iternext through pointer to incorrect function type 'struct _object *(*)(struct _object *)'
/home/cpython/Objects/setobject.c:844:27: note: setiter_iternext defined here
Objects/object.c:1071:16: runtime error: call to function bytes_hash through pointer to incorrect function type 'long (*)(struct _object *)'
/home/cpython/Objects/bytesobject.c:1599:12: note: bytes_hash defined here
Python/bltinmodule.c:323:16: runtime error: call to function gen_iternext through pointer to incorrect function type 'struct _object *(*)(struct _object *)'
/home/cpython/Objects/genobject.c:586: note: gen_iternext defined here
Python/generated_cases.c.h:3201:36: runtime error: call to function unicode_ascii_iter_next through pointer to incorrect function type 'struct _object *(*)(struct _object *)'
/home/cpython/Objects/unicodeobject.c:15749: note: unicode_ascii_iter_next defined here
Python/generated_cases.c.h:3215:21: runtime error: call to function _PyObject_GC_UNTRACK through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/./Include/internal/pycore_object.h:447:23: note: _PyObject_GC_UNTRACK defined here
Objects/abstract.c:1135:18: runtime error: call to function tupleconcat through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/Objects/tupleobject.c:467:9: note: tupleconcat defined here
Python/generated_cases.c.h:1558:13: runtime error: call to function method_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/classobject.c:239: note: method_dealloc defined here
Python/generated_cases.c.h:1559:13: runtime error: call to function tupledealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:185: note: tupledealloc defined here
Python/generated_cases.c.h:7012:13: runtime error: call to function tupledealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:185: note: tupledealloc defined here
Objects/object.c:1859:15: runtime error: call to function tuplelength through pointer to incorrect function type 'long (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:347:12: note: tuplelength defined here
Python/generated_cases.c.h:387:17: runtime error: call to function _PyObject_GC_UNTRACK through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/sliceobject.c:345: note: _PyObject_GC_UNTRACK defined here
Objects/abstract.c:961:13: runtime error: call to function long_add through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/Objects/longobject.c:3798:5: note: long_add defined here
Python/generated_cases.c.h:1403:21: runtime error: call to function gen_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/genobject.c:122: note: gen_dealloc defined here
Objects/typeobject.c:2581:5: runtime error: call to function ImportError_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/exceptions.c:1607: note: ImportError_dealloc defined here
Python/generated_cases.c.h:2661:17: runtime error: call to function PyObject_Free through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/obmalloc.c:1332: note: PyObject_Free defined here
Objects/listobject.c:1196:26: runtime error: call to function gen_iternext through pointer to incorrect function type 'struct _object *(*)(struct _object *)'
/home/cpython/Objects/genobject.c:586: note: gen_iternext defined here
Python/generated_cases.c.h:2088:35: runtime error: call to function list_extend through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/Objects/listobject.c:1387: note: list_extend defined here
Python/generated_cases.c.h:2094:17: runtime error: call to function gen_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/genobject.c:122: note: gen_dealloc defined here
Python/generated_cases.c.h:4406:21: runtime error: call to function structseq_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/structseq.c:126: note: structseq_dealloc defined here
Python/generated_cases.c.h:6987:13: runtime error: call to function tupledealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:185: note: tupledealloc defined here
Objects/methodobject.c:484:24: runtime error: call to function _io_FileIO_readall through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/./Modules/_io/clinic/fileio.c.h:281:12: note: _io_FileIO_readall defined here
Objects/descrobject.c:380:24: runtime error: call to function _io_FileIO_close through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _typeobject *, struct _object *const *, unsigned long, struct _object *)'
/home/cpython/./Modules/_io/clinic/fileio.c.h:29: note: _io_FileIO_close defined here
Objects/object.c:976:15: runtime error: call to function bytes_richcompare through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *, int)'
/home/cpython/Objects/bytesobject.c:1535: note: bytes_richcompare defined here
Objects/methodobject.c:441:24: runtime error: call to function int_from_bytes through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *const *, long, struct _object *)'
/home/cpython/Objects/clinic/longobject.c.h:396: note: int_from_bytes defined here
Objects/abstract.c:442:15: runtime error: call to function bytes_buffer_getbuffer through pointer to incorrect function type 'int (*)(struct _object *, Py_buffer *, int)'
/home/cpython/Objects/bytesobject.c:1674: note: bytes_buffer_getbuffer defined here
Python/generated_cases.c.h:4869:17: runtime error: call to function structseq_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/structseq.c:126: note: structseq_dealloc defined here
Python/generated_cases.c.h:6346:21: runtime error: call to function set_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/setobject.c:494: note: set_dealloc defined here
Python/generated_cases.c.h:1903:21: runtime error: call to function tupledealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:185: note: tupledealloc defined here
Python/generated_cases.c.h:1647:13: runtime error: call to function tupledealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:185: note: tupledealloc defined here
Python/generated_cases.c.h:2662:17: runtime error: call to function PyObject_Free through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/obmalloc.c:1332: note: PyObject_Free defined here
Python/generated_cases.c.h:1756:17: runtime error: call to function func_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/funcobject.c:1046: note: func_dealloc defined here
Include/internal/pycore_call.h:167:11: runtime error: call to function range_vectorcall through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *const *, unsigned long, struct _object *)'
/home/cpython/Objects/rangeobject.c:150:10: note: range_vectorcall defined here
Python/generated_cases.c.h:5772:13: runtime error: call to function _PyObject_GC_UNTRACK through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/./Include/internal/pycore_object.h:447:23: note: _PyObject_GC_UNTRACK defined here
Python/generated_cases.c.h:2573:17: runtime error: call to function set_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/setobject.c:494: note: set_dealloc defined here
Python/generated_cases.c.h:6557:17: runtime error: call to function _PyObject_GC_UNTRACK through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/sliceobject.c:345: note: _PyObject_GC_UNTRACK defined here
Objects/abstract.c:969:23: runtime error: call to function long_mul through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/Objects/longobject.c:4277:5: note: long_mul defined here
Python/bltinmodule.c:1547:11: runtime error: call to function gen_iternext through pointer to incorrect function type 'struct _object *(*)(struct _object *)'
/home/cpython/Objects/genobject.c:586: note: gen_iternext defined here
Objects/descrobject.c:420:24: runtime error: call to function bytes_decode through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *const *, long, struct _object *)'
/home/cpython/Objects/clinic/bytesobject.c.h:1034: note: bytes_decode defined here
Python/generated_cases.c.h:1969:35: runtime error: call to function bytes_decode through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *const *, long, struct _object *)'
/home/cpython/Objects/clinic/bytesobject.c.h:1034: note: bytes_decode defined here
Objects/abstract.c:1378:1: runtime error: call to function long_neg through pointer to incorrect function type 'struct _object *(*)(struct _object *)'
/home/cpython/Objects/longobject.c:5193: note: long_neg defined here
Objects/abstract.c:1225:27: runtime error: call to function set_ior through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/Objects/setobject.c:1333: note: set_ior defined here
Python/gc.c:1389:16: runtime error: call to function meth_traverse through pointer to incorrect function type 'int (*)(struct _object *, int (*)(struct _object *, void *), void *)'
/home/cpython/Objects/methodobject.c:248: note: meth_traverse defined here
Objects/typeobject.c:2359:16: runtime error: call to function tupletraverse through pointer to incorrect function type 'int (*)(struct _object *, int (*)(struct _object *, void *), void *)'
/home/cpython/Objects/tupleobject.c:625: note: tupletraverse defined here
Python/generated_cases.c.h:46:17: runtime error: call to function set_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/setobject.c:494: note: set_dealloc defined here
Python/generated_cases.c.h:47:17: runtime error: call to function set_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/setobject.c:494: note: set_dealloc defined here
Python/generated_cases.c.h:2743:17: runtime error: call to function set_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/setobject.c:494: note: set_dealloc defined here
Python/generated_cases.c.h:2797:13: runtime error: call to function set_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/setobject.c:494: note: set_dealloc defined here
Python/generated_cases.c.h:2030:35: runtime error: call to function set_pop through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/Objects/clinic/setobject.c.h:24: note: set_pop defined here
Python/generated_cases.c.h:1458:17: runtime error: call to function gen_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/genobject.c:122: note: gen_dealloc defined here
Objects/methodobject.c:512:24: runtime error: call to function type___subclasscheck__ through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/Objects/clinic/typeobject.c.h:49: note: type___subclasscheck__ defined here
Python/generated_cases.c.h:2956:13: runtime error: call to function _PyObject_GC_UNTRACK through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/sliceobject.c:345: note: _PyObject_GC_UNTRACK defined here
Python/generated_cases.c.h:430:17: runtime error: call to function _PyObject_GC_UNTRACK through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/sliceobject.c:345: note: _PyObject_GC_UNTRACK defined here
Python/gc.c:1108:24: runtime error: call to function func_clear through pointer to incorrect function type 'int (*)(struct _object *)'
/home/cpython/Objects/funcobject.c:1021: note: func_clear defined here
Python/generated_cases.c.h:3501:13: runtime error: call to function range_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/rangeobject.c:168: note: range_dealloc defined here
Python/generated_cases.c.h:1262:35: runtime error: call to function range_vectorcall through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *const *, unsigned long, struct _object *)'
/home/cpython/Objects/rangeobject.c:150:10: note: range_vectorcall defined here
Python/generated_cases.c.h:3348:21: runtime error: call to function PyObject_Free through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/obmalloc.c:1332: note: PyObject_Free defined here
Python/generated_cases.c.h:1455:35: runtime error: call to function Py_INCREF through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/./Include/refcount.h:241:30: note: Py_INCREF defined here
Objects/abstract.c:1380:1: runtime error: call to function long_invert through pointer to incorrect function type 'struct _object *(*)(struct _object *)'
/home/cpython/Objects/longobject.c:5180:9: note: long_invert defined here
Python/generated_cases.c.h:118:17: runtime error: call to function PyObject_Free through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/obmalloc.c:1332: note: PyObject_Free defined here
Objects/methodobject.c:425:24: runtime error: call to function dict_fromkeys through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *const *, long)'
/home/cpython/Objects/clinic/dictobject.c.h:22: note: dict_fromkeys defined here
Python/generated_cases.c.h:356:17: runtime error: call to function PyObject_Free through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/obmalloc.c:1332: note: PyObject_Free defined here
Objects/abstract.c:232:19: runtime error: call to function bytearray_ass_subscript through pointer to incorrect function type 'int (*)(struct _object *, struct _object *, struct _object *)'
/home/cpython/Objects/bytearrayobject.c:592: note: bytearray_ass_subscript defined here
Python/generated_cases.c.h:1266:21: runtime error: call to function bytearray_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/bytearrayobject.c:1084: note: bytearray_dealloc defined here
Python/bltinmodule.c:1434:25: runtime error: call to function unicode_ascii_iter_next through pointer to incorrect function type 'struct _object *(*)(struct _object *)'
/home/cpython/Objects/unicodeobject.c:15749: note: unicode_ascii_iter_next defined here
Python/generated_cases.c.h:2742:17: runtime error: call to function tupledealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:185: note: tupledealloc defined here
Objects/abstract.c:1687:26: runtime error: call to function tuplelength through pointer to incorrect function type 'long (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:347:12: note: tuplelength defined here
Objects/abstract.c:1847:25: runtime error: call to function tupleitem through pointer to incorrect function type 'struct _object *(*)(struct _object *, long)'
/home/cpython/Objects/tupleobject.c:364:11: note: tupleitem defined here
Python/bltinmodule.c:2978:20: runtime error: call to function reversed_next through pointer to incorrect function type 'struct _object *(*)(struct _object *)'
/home/cpython/Objects/enumobject.c:430: note: reversed_next defined here
Python/bltinmodule.c:3001:20: runtime error: call to function reversed_next through pointer to incorrect function type 'struct _object *(*)(struct _object *)'
/home/cpython/Objects/enumobject.c:430: note: reversed_next defined here
Python/generated_cases.c.h:2403:17: runtime error: call to function map_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Python/bltinmodule.c:1396: note: map_dealloc defined here
Objects/methodobject.c:551:18: runtime error: call to function lock_PyThread_release_lock through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/./Modules/_threadmodule.c:828: note: lock_PyThread_release_lock defined here
Python/generated_cases.c.h:117:17: runtime error: call to function PyObject_Free through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/obmalloc.c:1332: note: PyObject_Free defined here
Python/ceval.c:909:17: runtime error: call to function _PyObject_GC_UNTRACK through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/./Include/internal/pycore_object.h:447:23: note: _PyObject_GC_UNTRACK defined here
Objects/abstract.c:1157:21: runtime error: call to function bytes_repeat through pointer to incorrect function type 'struct _object *(*)(struct _object *, long)'
/home/cpython/Objects/bytesobject.c:1460: note: bytes_repeat defined here
Objects/abstract.c:1306:26: runtime error: call to function bytearray_iconcat through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/Objects/bytearrayobject.c:296: note: bytearray_iconcat defined here
Objects/abstract.c:812:9: runtime error: call to function bytearray_releasebuffer through pointer to incorrect function type 'void (*)(struct _object *, Py_buffer *)'
/home/cpython/Objects/bytearrayobject.c:63:20: note: bytearray_releasebuffer defined here
Python/generated_cases.c.h:6708:17: runtime error: call to function match_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/./Modules/_sre/sre.c:2149: note: match_dealloc defined here
Python/lock.c:330:23: runtime error: call to function init_types through pointer to incorrect function type 'int (*)(void *)'
/home/cpython/Python/Python-ast.c:5829: note: init_types defined here
Objects/call.c:242:18: runtime error: call to function partial_call through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *, struct _object *)'
/home/cpython/./Modules/_functoolsmodule.c:310: note: partial_call defined here
Objects/abstract.c:1717:25: runtime error: call to function tupleconcat through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/Objects/tupleobject.c:467:9: note: tupleconcat defined here
Python/generated_cases.c.h:2165:17: runtime error: call to function partial_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/./Modules/_functoolsmodule.c:188: note: partial_dealloc defined here
Python/generated_cases.c.h:2574:17: runtime error: call to function tupledealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:185: note: tupledealloc defined here
Objects/methodobject.c:540:18: runtime error: call to function generic_init_subclass through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *, struct _object *)'
/home/cpython/Objects/typevarobject.c:2143: note: generic_init_subclass defined here
Objects/abstract.c:1871:25: runtime error: call to function tuplesubscript through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *)'
/home/cpython/Objects/tupleobject.c:785: note: tuplesubscript defined here
Python/generated_cases.c.h:1687:17: runtime error: call to function method_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/classobject.c:239: note: method_dealloc defined here
Objects/call.c:361:18: runtime error: call to function lru_cache_call through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *, struct _object *)'
/home/cpython/./Modules/_functoolsmodule.c:1325:20: note: lru_cache_call defined here
Python/generated_cases.c.h:1327:35: runtime error: call to function typevar_typing_prepare_subst through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *const *, long)'
/home/cpython/Objects/clinic/typevarobject.c.h:141: note: typevar_typing_prepare_subst defined here
Python/generated_cases.c.h:1583:13: runtime error: call to function tupledealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:185: note: tupledealloc defined here
Python/generated_cases.c.h:461:13: runtime error: call to function tupledealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:185: note: tupledealloc defined here
Python/generated_cases.c.h:2167:21: runtime error: call to function tupledealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:185: note: tupledealloc defined here
Python/generated_cases.c.h:6736:17: runtime error: call to function match_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/./Modules/_sre/sre.c:2149: note: match_dealloc defined here
Python/generated_cases.c.h:1459:17: runtime error: call to function meth_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/methodobject.c:160: note: meth_dealloc defined here
Python/generated_cases.c.h:1337:17: runtime error: call to function meth_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/methodobject.c:160: note: meth_dealloc defined here
Python/generated_cases.c.h:4342:13: runtime error: call to function tupledealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/tupleobject.c:185: note: tupledealloc defined here
Python/generated_cases.c.h:1506:17: runtime error: call to function set_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
/home/cpython/Objects/setobject.c:494: note: set_dealloc defined here
Objects/moduleobject.c:775:9: runtime error: call to function locale_free through pointer to incorrect function type 'void (*)(void *)'
/home/cpython/./Modules/_localemodule.c:885: note: locale_free defined here
Python/hashtable.c:385:9: runtime error: call to function del_extensions_cache_value through pointer to incorrect function type 'void (*)(void *)'
/home/cpython/Python/import.c:1140:15: note: del_extensions_cache_value defined here

@picnixz
Copy link
Member Author

picnixz commented Aug 27, 2024

!buildbot Usan Function

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @picnixz for commit 531d69d 🤖

The command will test the builders whose names match following regular expression: Usan Function

The builders matched are:

  • AMD64 Arch Linux Usan Function PR

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I'm fine with fixing these issues incrementally. We don't need a giant PR fixing all issues at once.

@picnixz
Copy link
Member Author

picnixz commented Sep 19, 2024

Sounds good. When I'm back I'll freeze this branch and move the task list I had in the issue (just for me otherwise I'll lose it...).

@picnixz picnixz changed the title gh-111178: fix arch linux usan failure (WIP) gh-111178: fix arch linux usan failure Sep 25, 2024
@picnixz
Copy link
Member Author

picnixz commented Sep 25, 2024

Ok, so the commits are a bit moving around and it'll probably be easier for me to fix the failures files by files instead of discovering them one by one. I'll just commit those few bits for those few files because I don't want to create more PRs and close this one, but I'll try to be more rigourous for the next ones.

@picnixz picnixz changed the title gh-111178: fix arch linux usan failure gh-111178: fix some USAN failures Sep 25, 2024
@picnixz picnixz marked this pull request as ready for review September 25, 2024 13:31
@encukou encukou merged commit 702c4a2 into python:main Sep 27, 2024
39 checks passed
@encukou
Copy link
Member

encukou commented Sep 27, 2024

Thank you!
Being rigorous is for your own sanity; I'm happy to review these in any order you want :)

@picnixz picnixz deleted the fix-arch-linux-usan-failure-full branch September 27, 2024 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants