Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Crash report
What happened?
Tested on the latestubuntu:25.04 docker image.
fromctypesimportStructureclassMyStructure(Structure):_align_=0_fields_= []
Crashes withFloating point exception on CPython 3.13.
I'm attaching both gdb core dump and backtrace:dump.zip
Problem seems caused by_ctypes/stgdict.c:573:aligned_size = ((size + total_align - 1) / total_align) * total_align;
Also tested on CPython 3.14, which doesn't segfaults but exits on an assert inctypes/_layout.py:19:assert multiple > 0
called byctypes/_layout.py:314:aligned_size = round_up(total_size, align)
CPython versions tested on:
3.13
Operating systems tested on:
Linux
Output from running 'python -VV' on the command line:
Python 3.13.3 (main, Apr 8 2025, 19:55:40) [GCC 14.2.0]