M2 icon indicating copy to clipboard operation
M2 copied to clipboard

toField() leads to a crash

Open glenndavis52 opened this issue 2 years ago • 1 comments

input:

Qi  =  toField( QQ[i]/(i^2+1) )

R   = Qi[u,v]

(u + v) / i

output:

-- SIGSEGV
-* stack trace, pid: 12251
 0# 0x000000000064E665 in /usr/bin/M2-binary
 1# 0x000000000064E8D3 in /usr/bin/M2-binary
 2# 0x00007FC88D820760 in /lib64/libc.so.6
 3# 0x00000000009224AF in /usr/bin/M2-binary
...
38# 0x00007FC88E41D9A8 in /lib64/libgc.so.1
39# GC_call_with_stack_base in /lib64/libgc.so.1
40# 0x00007FC88D86BB17 in /lib64/libc.so.6
41# clone in /lib64/libc.so.6
-- end stack trace *-

Without the toField(), all is OK.

I am using:
Macaulay2Web Macaulay2, version 1.22.0.1

glenndavis52 avatar Apr 06 '24 01:04 glenndavis52

Yes this is the same issue that was reported before in the mailing list. It's my fault, I inadvertently let a PR slip into the web version which has not been tested thoroughly yet, namely, fraction fields of iterated polynomial rings. In normal M2 you'd just get the error message error: not implemented yet: fraction fields of polynomial rings over rings other than ZZ, QQ, or a finite field. The way to avoid this is to not ask M2 to use the fraction field:

i4 : (u+v)*i^-1

o4 = - i*u - i*v

o4 : Qi[u..v]

pzinn avatar Apr 06 '24 02:04 pzinn

@d-torrance @pzinn can we close this issue?

mikestillman avatar Jun 21 '24 12:06 mikestillman

On Fri, Jun 21, 2024 at 8:27 AM Mike Stillman @.***> wrote:

@d-torrance https://github.com/d-torrance @pzinn https://github.com/pzinn can we close this issue?

Yes, indeed !

Glenn

glenndavis52 avatar Jun 21 '24 12:06 glenndavis52