Closed
Description
sage: loads(dumps(function('f')(x)))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
~/s/sage/sage-rebasing/worktree-gcc11/src/sage/libs/pynac/pynac.pyx in sage.libs.pynac.pynac.py_print_function_pystring()
491 olist = [func._name]
492 olist.extend(['(', ', '.join(map(repr, args)), ')'])
--> 493 return ''.join(olist)
494
495 cdef stdstring* py_print_function(unsigned id, args):
TypeError: sequence item 0: expected str instance, bytes found
Exception ignored in: 'sage.libs.pynac.pynac.py_print_function'
Traceback (most recent call last):
File "sage/libs/pynac/pynac.pyx", line 493, in sage.libs.pynac.pynac.py_print_function_pystring
TypeError: sequence item 0: expected str instance, bytes found
------------------------------------------------------------------------
(no backtrace available)
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred.
As without #32480, deepcopy
goes through pickling/unpickling, this also causes a failure of deepcopy
as originally reported:
When I deepcopy expression containing function, a segmentation fault occurred.
sage: var('t');
sage: x = function('x')(t);
sage: l = [[x(t) == 1]];
sage: l
[[x(t) == 1]]
sage: l2 = deepcopy(l);
sage: l2
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/Applications/SageMath-9.1.app/Contents/Resources/sage/local/lib/python3.7/site-packages/sage/libs/pynac/pynac.pyx in sage.libs.pynac.pynac.py_print_function_pystring (build/cythonized/sage/libs/pynac/pynac.cpp:7182)()
491 olist = [func._name]
492 olist.extend(['(', ', '.join(map(repr, args)), ')'])
--> 493 return ''.join(olist)
494
495 cdef stdstring* py_print_function(unsigned id, args):
TypeError: sequence item 0: expected str instance, bytes found
Exception ignored in: 'sage.libs.pynac.pynac.py_print_function'
Traceback (most recent call last):
File "sage/libs/pynac/pynac.pyx", line 493, in sage.libs.pynac.pynac.py_print_function_pystring (build/cythonized/sage/libs/pynac/pynac.cpp:7182)
TypeError: sequence item 0: expected str instance, bytes found
------------------------------------------------------------------------
(no backtrace available)
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------
/Applications/SageMath-9.1.app/Contents/Resources/sage/src/bin/sage-python: line 2: 14997 Segmentation fault: 11 sage -python "$@"
Is this known issue?
Depends on #32386
Component: symbolics
Issue created by migration from https://trac.sagemath.org/ticket/30018