GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-111178: fix some USAN failures by picnixz · Pull Request #123004 · python/cpython

Conversation

@picnixz

@picnixz picnixz commented Aug 14, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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).

  • Issue: UBSan: Calling a function through pointer to incorrect function type is undefined behavior #111178

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
picnixz added 2 commits August 13, 2024 17:10
@picnixz
Make long_hash compatible with hashfunc
cd63f58
@picnixz
Make MemoryError_dealloc compatible with destructor
cc28b38
@picnixz
picnixz requested a review from iritkatriel as a code owner August 14, 2024 09:08
@bedevere-app bedevere-app Bot mentioned this pull request Aug 14, 2024
UBSan: Calling a function through pointer to incorrect function type is undefined behavior #111178
Closed
@bedevere-app bedevere-app Bot added the awaiting review label Aug 14, 2024
@picnixz
picnixz removed the request for review from iritkatriel August 14, 2024 09:08
@picnixz

picnixz commented Aug 14, 2024

Copy link
Copy Markdown
Member Author

!buildbot Usan

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Aug 14, 2024

Copy link
Copy Markdown

🤖 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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Aug 14, 2024

Copy link
Copy Markdown
Member Author

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...

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz picnixz added the skip news label Aug 14, 2024
@picnixz picnixz mentioned this pull request Aug 14, 2024
gh-111178: Avoid calling functions from incompatible pointer types in longobject.c #122972
Merged
@picnixz
Make tupleiter_next compatible with iternextfunc
e29710f
@picnixz

picnixz commented Aug 14, 2024

Copy link
Copy Markdown
Member Author

!buildbot Usan

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Aug 14, 2024

Copy link
Copy Markdown

🤖 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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz
picnixz marked this pull request as draft August 14, 2024 09:17
@bedevere-app bedevere-app Bot removed the awaiting review label Aug 14, 2024
@picnixz

picnixz commented Aug 14, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

@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 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@encukou

encukou commented Aug 14, 2024

Copy link
Copy Markdown
Member

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz

picnixz commented Aug 14, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@picnixz
Make range_vectorcall compatible with vectorcallfunc
531d69d
@picnixz picnixz mentioned this pull request Aug 14, 2024
Add Arch Linux Usan 3.x/ build bot with -fno-sanitize=function python/buildmaster-config#517
Closed
@picnixz

picnixz commented Aug 27, 2024

Copy link
Copy Markdown
Member Author

!buildbot Usan Function

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Aug 27, 2024

Copy link
Copy Markdown

🤖 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
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vstinner
vstinner approved these changes Sep 18, 2024
View reviewed changes

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added the awaiting merge label Sep 18, 2024
@picnixz

picnixz commented Sep 19, 2024

Copy link
Copy Markdown
Member Author

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...).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

picnixz commented Sep 25, 2024

Copy link
Copy Markdown
Member Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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
@bedevere-app bedevere-app Bot added awaiting review and removed awaiting merge labels Sep 25, 2024
@encukou
encukou merged commit 702c4a2 into python:main Sep 27, 2024
@bedevere-app bedevere-app Bot removed the awaiting review label Sep 27, 2024
@encukou

encukou commented Sep 27, 2024

Copy link
Copy Markdown
Member

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

vstinner reacted with thumbs up emoji picnixz reacted with heart emoji
All reactions
  • 👍 1 reaction
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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

Reviewers

@vstinner vstinner vstinner approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@picnixz @bedevere-bot @encukou @vstinner
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.