Ticket #7152 (closed defect: fixed)
Segmentation fault with monomials()
| Reported by: | mraum | Owned by: | tbd |
|---|---|---|---|
| Priority: | major | Milestone: | sage-4.3.1 |
| Component: | algebra | Keywords: | monomials, singular |
| Cc: | MRaum@…, malb, wjp | Work issues: | |
| Report Upstream: | N/A | Reviewers: | Willem Jan Palenstijn |
| Authors: | Burcin Erocal | Merged in: | sage-4.3.1.rc1 |
| Dependencies: | Stopgaps: |
Description
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.
Attachments
Change History
comment:1 Changed 3 years ago by burcin
- Cc malb, wjp added
- Keywords singular added; multivariate polynomial ring, coercion removed
- Report Upstream set to N/A
- Status changed from new to needs_review
- Authors set to Burcin Erocal
Changed 3 years ago by burcin
-
attachment
trac_7152-monomials_cring.patch
added
set current ring for singular in monomials() method
Note: See
TracTickets for help on using
tickets.

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