ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 26 Feb 2022 18:13:10 +0100EllipticCurve.rank (mwrank) leads to segmentation fault in Sage 9.5/9.0, but to a regular exception in Sage 8.2. Is this a bug of Sage 9.5/9.0?https://ask.sagemath.org/question/61296/ellipticcurverank-mwrank-leads-to-segmentation-fault-in-sage-9590-but-to-a-regular-exception-in-sage-82-is-this-a-bug-of-sage-9590/Hello,
when I try to calculate the rank of elliptic curves, Sage 8.2 works well and tells me in some cases by throwing exceptions, that it could not calculate it. See code example below.
In Sage 9.5 (as well as in Sage 9.0) the same code leads to a segmentation fault. To be more precise, the 1st try of EllipticCurve.rank() leads to a "divison by zero" exception, And the 2nd try (for the same curve or for a curve that leads to the same problem) then leads to segmentation fault.
You may reproduce it on SageMathCell (sagecell.sagemath.org). Simply copy the code below and evaluate.
If you agree that this is a bug - what should I do to open a ticket?
Best Regards
Daniel Lauer
--
<pre><code>
print("Version of Sage: {}".format(version()))
print("\n(1) Everything okay in this simple case of calling EllipticCurve.rank():")
E = EllipticCurve([0,4321,0,1234,0])
print("E = {}".format(E))
k = E.rank(only_use_mwrank=True)
print("rank = {}\n".format(k))
print("\n(2) Still okay: Same method for different curve will lead to an exception. That's okay.")
print(" Problem B (prio 2) is: The exception is a different one, now.")
print(" In Sage 8.2, it was 'rank not provably correct (lower bound: 0)' -- and I think, this is the correct one.")
print(" In Sage 9.0 and 9.5 the exception is 'division by zero'")
E = EllipticCurve([0,20752947797,0,74237199888641440000,0])
print("E = {}".format(E))
try:
k = E.rank(only_use_mwrank=True)
print("rank = {}\n".format(k))
except Exception as exc:
print("Exception: {}".format(str(exc)))
print("\n(3) So, let's do a rank computation for a different curve. This works well in all versions of Sage.")
E = EllipticCurve([0,5432,0,2345,0])
print("E = {}".format(E))
k = E.rank(only_use_mwrank=True)
print("rank = {}\n".format(k))
print("\n(4) Now problem A (prio 1) will occur: If we start a rank computation that shows the same problem as in (2), ...")
print(" ... in Sage 8.2, everything is fine: the same exception will be returned, again.")
print(" ... in Sage 9.0 and 9.5, Sage crashes with 'segmentation fault'")
E = EllipticCurve([0,20752947797,0,74237199888641440000,0])
#E = EllipticCurve([0,108066172377/1024,0,6926399795059430625/4096,0]) # the same behaviour if we choose this elliptic curve here instead of the former one
print("E = {}".format(E))
try:
k = E.rank(only_use_mwrank=True)
print("rank = {}\n".format(k))
except Exception as exc:
print("Exception: {}".format(str(exc)))
print("\n(5) Further code: ...")
print(" ... in Sage 8.2, everything is fine: the code is executed.")
print(" ... in Sage 9.0 and 9.5 this code is never reached because of segmentation fault.")
</code></pre>
Daniel LauerSat, 26 Feb 2022 18:13:10 +0100https://ask.sagemath.org/question/61296/