Sage crashes when attempting to coerce Magma element to boolean

17 views
Skip to first unread message

Daniel Hast

unread,
Oct 19, 2021, 1:02:37 AMOct 19
to sage-devel
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
bug-report-2021-10-18.txt

David Roe

unread,
Oct 19, 2021, 1:46:18 AMOct 19
to sage-devel

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/0355e7ee-1a00-4479-b8df-d62e2fc2e0f2n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages