Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault with monomials() #7152

Closed
sagetrac-mraum mannequin opened this issue Oct 8, 2009 · 7 comments
Closed

Segmentation fault with monomials() #7152

sagetrac-mraum mannequin opened this issue Oct 8, 2009 · 7 comments

Comments

@sagetrac-mraum
Copy link
Mannequin

sagetrac-mraum mannequin commented Oct 8, 2009

Using implicite coercion and then calling monomials might cause a segmentation fault. This is a side effect.

K.<rho> = NumberField(x**2 + 1)
R.<x,y> = QQ[]
p = rho*x
q = x
p.monomials()
 ...
q.monomials()
 ...
p.monomials()
 Segmentation Fault

Going back to line 5 you can avoid this by

p.parent()(p).monomials()
 ...
q.parent()(q).monomials()
 ...
p.parent()(p).monomials()
 ...

This might be used as a workaround.

If no implicite coercion is involved, everything works fine, i.e. use

R.<x,y> = K[]

This is most probably related to #6160.

CC: @sagetrac-mraum @malb @wjp

Component: algebra

Keywords: monomials, singular

Author: Burcin Erocal

Reviewer: Willem Jan Palenstijn

Merged: sage-4.3.1.rc1

Issue created by migration from https://trac.sagemath.org/ticket/7152

@sagetrac-mraum sagetrac-mraum mannequin added this to the sage-4.3.1 milestone Oct 8, 2009
@sagetrac-mraum sagetrac-mraum mannequin added c: algebra labels Oct 8, 2009
@burcin
Copy link

burcin commented Jan 17, 2010

Author: Burcin Erocal

@burcin
Copy link

burcin commented Jan 17, 2010

comment:1

This segfaults because the monomials() method doesn't set the current ring. attachment: trac_7152-monomials_cring.patch contains the fix.

@burcin
Copy link

burcin commented Jan 17, 2010

Changed keywords from monomials, multivariate polynomial ring to monomials, singular

@burcin
Copy link

burcin commented Jan 17, 2010

set current ring for singular in monomials() method

@wjp
Copy link
Mannequin

wjp mannequin commented Jan 17, 2010

comment:2

Attachment: trac_7152-monomials_cring.patch.gz

Looks good.

@wjp wjp mannequin added s: positive review and removed s: needs review labels Jan 17, 2010
@rlmill
Copy link
Mannequin

rlmill mannequin commented Jan 18, 2010

Merged: sage-4.3.1.rc1

@rlmill
Copy link
Mannequin

rlmill mannequin commented Jan 18, 2010

Reviewer: Willem Jan Palenstijn

@rlmill rlmill mannequin removed the s: positive review label Jan 18, 2010
@rlmill rlmill mannequin closed this as completed Jan 18, 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant