Skip to content

Segmentation fault with monomials() #7152

@sagetrac-mraum

Description

@sagetrac-mraum

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions