Opened 6 years ago

Closed 5 years ago

#21391 closed enhancement (duplicate)

Disallow mixing of pos.char.ring elements and symbolic variables

Reported by: Ralf Stephan Owned by:
Priority: critical Milestone: sage-duplicate/invalid/wontfix
Component: symbolics Keywords: segfault
Cc: Jeroen Demeyer, Vincent Delecroix, Samuel Lelièvre Merged in:
Authors: Reviewers: Ralf Stephan
Report Upstream: N/A Work issues:
Branch: u/rws/disallow_mixing_of_pos_char_ring_elements_and_symbolic_variables (Commits, GitHub, GitLab) Commit: 8de83982441dd28b52f6f544218d48431381d8d9
Dependencies: Stopgaps:

Status badges

Description (last modified by Ralf Stephan)

This is to have a place for code examples and discussion of impact of the proposal in https://groups.google.com/forum/?hl=en#!topic/sage-devel/auLwQWtpnz0

The following produces a segmentation fault (Sage 7.4, Ubuntu 14.04 or OS X 10.10.5), see Ask Sage.

sage: F = GF(3)
sage: num, den = F(2)*x + F(1), x
sage: num/den
 ... segmentation fault ...

With this branch this gives: TypeError: Multiplication of symbolic variable and an element of a ring with positive characteristic.

See also sage-support.

Change History (17)

comment:1 Changed 6 years ago by Ralf Stephan

Branch: u/rws/disallow_mixing_of_pos_char_ring_elements_and_symbolic_variables

comment:2 Changed 6 years ago by Ralf Stephan

Authors: Ralf Stephan
Cc: Jeroen Demeyer Vincent Delecroix added
Commit: 7147699e66955b2a130a871b97886ec5af3a665d

In a first scan these doctests would have to be changed:

sage -t src/sage/symbolic/expression.pyx  # 11 doctests failed
sage -t src/sage/symbolic/pynac.pyx  # 2 doctests failed
sage -t src/sage/rings/polynomial/polynomial_element.pyx  # 2 doctests failed
sage -t src/sage/rings/polynomial/laurent_polynomial.pyx  # 2 doctests failed
sage -t src/sage/rings/polynomial/polynomial_zz_pex.pyx  # 1 doctest failed

New commits:

714769921391: Disallow mixing of pos.char.ring elements and symbolic variables

comment:3 Changed 6 years ago by Ralf Stephan

Alternatively this could be made a stopgap. Which is better?

comment:4 Changed 6 years ago by Samuel Lelièvre

Cc: Samuel Lelièvre added
Description: modified (diff)
Keywords: segfault added

Adding an example leading to a segmentation fault to the ticket description.

comment:5 Changed 6 years ago by Samuel Lelièvre

Description: modified (diff)

comment:6 Changed 6 years ago by Ralf Stephan

Description: modified (diff)
Milestone: sage-7.4sage-7.6

comment:7 Changed 6 years ago by git

Commit: 7147699e66955b2a130a871b97886ec5af3a665df2933cc95f5ace319d93038c92bd92e9b6e3e3ac

Branch pushed to git repo; I updated commit sha1. New commits:

dd6ad96Merge branch 'develop' into t/21391/disallow_mixing_of_pos_char_ring_elements_and_symbolic_variables
03ccd07Merge branch 'develop' into t/21391/disallow_mixing_of_pos_char_ring_elements_and_symbolic_variables
f2933cc21391: introduce ex.has_finite_parent()

comment:8 Changed 6 years ago by Ralf Stephan

Status: newneeds_review

comment:9 Changed 6 years ago by Ralf Stephan

Priority: majorcritical

Critical because of segfault and public interest.

comment:10 Changed 6 years ago by git

Commit: f2933cc95f5ace319d93038c92bd92e9b6e3e3ac333db3c0de1e767304a8b9be2e2894038d0b3cbd

Branch pushed to git repo; I updated commit sha1. New commits:

333db3cMerge branch 'develop' into t/21391/disallow_mixing_of_pos_char_ring_elements_and_symbolic_variables

comment:11 Changed 6 years ago by Ralf Stephan

Status: needs_reviewneeds_work

Doctest failures.

comment:12 Changed 6 years ago by git

Commit: 333db3c0de1e767304a8b9be2e2894038d0b3cbd9430605a17f8793efff5453966fea424e28423a0

Branch pushed to git repo; I updated commit sha1. New commits:

8700e00Merge branch 'develop' into t/21391/disallow_mixing_of_pos_char_ring_elements_and_symbolic_variables
c7f8ad221391: to prevent fails give the coordinate functions an explicit characteristic
943060521391: doctest fixes

comment:13 Changed 6 years ago by Ralf Stephan

Status: needs_workneeds_review

comment:14 Changed 5 years ago by git

Commit: 9430605a17f8793efff5453966fea424e28423a08de83982441dd28b52f6f544218d48431381d8d9

Branch pushed to git repo; I updated commit sha1. New commits:

8de8398Merge branch 'develop' into t/21391/disallow_mixing_of_pos_char_ring_elements_and_symbolic_variables

comment:15 Changed 5 years ago by Ralf Stephan

Milestone: sage-7.6sage-8.1
Status: needs_reviewneeds_work

Doctest failures.

comment:16 Changed 5 years ago by Maarten Derickx

Milestone: sage-8.1sage-duplicate/invalid/wontfix
Status: needs_workneeds_review

I think this can be closed as duplicate since #24072 has positive review.

comment:17 Changed 5 years ago by Jeroen Demeyer

Authors: Ralf Stephan
Resolution: duplicate
Reviewers: Ralf Stephan
Status: needs_reviewclosed
Note: See TracTickets for help on using tickets.