Sagemath 9.5 kernel crash from GF(2) empty vector dot product

29 views
Skip to first unread message

Tracy Hall

unread,
May 6, 2022, 12:04:10 AM5/6/22
to sage-support
The following two lines crash the kernel in 9.5 but not 9.4:

xx = vector(GF(2), [])
xx * xx

It works correctly (with answer 0) over other finite fields or over QQ.

Installation is Sagemath 9.5 in Ubuntu running under WSL for Windows; tested also in CoCalc Sagemath 9.5 (where it crashes) and CoCalc Sagemath 9.4 (where it correctly produces 0).

Justin C. Walker

unread,
May 6, 2022, 1:30:45 AM5/6/22
to SAGE Support
I can confirm that if I run these two lines, the following happens:

9.4 (built locally, from scratch): the printed result is 0

9/.5 (the version supplied by Marc Culler): SIGSEGV [a segmentation fault in sage] no traceback supplied

I am running on an iMac Pro (18 core Xeon), with macOS 10.13.6.

I assume by “the kernel” you mean Sage, not the linux kernel.

HTH

Justin

--
Justin C. Walker, Curmudgeon-At-Large
Director
Institute for the Enhancement of the Director's Income
--------
"Weaseling out of things is what separates us from the animals.
Well, except the weasel."
- Homer J Simpson
--------


Dima Pasechnik

unread,
May 6, 2022, 6:20:08 AM5/6/22
to sage-support
On Fri, May 6, 2022 at 5:04 AM Tracy Hall <h.t...@gmail.com> wrote:
>
> The following two lines crash the kernel in 9.5 but not 9.4:
>
> xx = vector(GF(2), [])
> xx * xx
>
> It works correctly (with answer 0) over other finite fields or over QQ.

IMHO the bug is in accepting vector(..., []) as a valid object - it's
a "vector" of length 0, after all.

Dima

>
> Installation is Sagemath 9.5 in Ubuntu running under WSL for Windows; tested also in CoCalc Sagemath 9.5 (where it crashes) and CoCalc Sagemath 9.4 (where it correctly produces 0).
>
> --
> You received this message because you are subscribed to the Google Groups "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sage-support...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/e74cf69e-fe56-49a6-90e6-73783137ec93n%40googlegroups.com.

G. M.-S.

unread,
May 6, 2022, 7:31:31 AM5/6/22
to sage-s...@googlegroups.com

I think that if k is a field, then k^n is a k-vector space for any nonnegative integer n, including 0.
And the empty sum is equal to 0.

In the same vein, all matrices of size (m,0) and (0,n) are equal and square and have determinant 1 (empty product).

Guillermo

Vincent Delecroix

unread,
May 6, 2022, 11:22:38 AM5/6/22
to sage-s...@googlegroups.com
Thanks for your report. I opened

https://trac.sagemath.org/ticket/33814

Best
Vincent
Reply all
Reply to author
Forward
0 new messages