I think I've found a bug in Sage's interface to Magma: Attempting to coerce a Magma element into a Python boolean causes Sage to crash with a stack overflow error.
To reproduce, start Sage and run the following line of code (note: the same bug also seems to occur if magma(True) is replaced with any other Magma element):
bool(magma(True))
Expected result: the expression evaluates to the boolean value True, or at worst raises a sensible exception in Python.
Actual result: Python crashes with the message "Fatal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow." I've attached a copy-paste of a complete Sage session where this occurred.
I am running Sage 9.4, using Python 3.9.5, and Magma V2.26-5. My operating system is macOS 10.5.7 running on a 64-bit Intel Core i7 processor with 16 GB of RAM.
Does this look like a bug in Sage or in Magma? And if it's a bug in Sage and isn't already reported, how would I go about reporting it?
Thanks,
Daniel Hast