3 ms·
Minimal example: >>> import ctypes >>> x = ctypes.c_double.from_param(1e300) >>> repr(x) Segmentation fault This happens when getting the string repre
by duckerude 6y ago
Minimal example:
>>> import ctypes
>>> x = ctypes.c_double.from_param(1e300)
>>> repr(x)
Segmentation fault
This happens when getting the string representation of a foreign function float. It doesn't affect the standard builtin float type. So it's not extremely common.
But I can imagine this cropping up if you e.g. find a way to cause an exception that formats a value. Or if there's aggressive logging.
- PhantomGremlin 6y agoFWIW this also crashes Python 2.7 on macOS Catalina.
- pantalaimon 6y agoPython 2 is EOL
- topkeks 6y agoPython 3.6 is the oldest maintained version.
- erdewit 6y agoFor Fedora 32 and 33 it seems to be already fixed: >>> repr(x) "<cparam 'd' (1e+300)>"