Opened 3 years ago

Closed 2 years ago

#21391 closed enhancement (duplicate)

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

Reported by: rws Owned by:
Priority: critical Milestone: sage-duplicate/invalid/wontfix
Component: symbolics Keywords: segfault
Cc: jdemeyer, vdelecroix, slelievre 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) Commit: 8de83982441dd28b52f6f544218d48431381d8d9
Dependencies: Stopgaps:

Description (last modified by rws)

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 3 years ago by rws

  • Branch set to u/rws/disallow_mixing_of_pos_char_ring_elements_and_symbolic_variables

comment:2 Changed 3 years ago by rws

  • Authors set to Ralf Stephan
  • Cc jdemeyer vdelecroix added
  • Commit set to 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 3 years ago by rws

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

comment:4 Changed 3 years ago by slelievre

  • Cc slelievre added
  • Description modified (diff)
  • Keywords segfault added

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

comment:5 Changed 3 years ago by slelievre

  • Description modified (diff)

comment:6 Changed 3 years ago by rws

  • Description modified (diff)
  • Milestone changed from sage-7.4 to sage-7.6

comment:7 Changed 3 years ago by git

  • Commit changed from 7147699e66955b2a130a871b97886ec5af3a665d to f2933cc95f5ace319d93038c92bd92e9b6e3e3ac

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 3 years ago by rws

  • Status changed from new to needs_review

comment:9 Changed 3 years ago by rws

  • Priority changed from major to critical

Critical because of segfault and public interest.

comment:10 Changed 3 years ago by git

  • Commit changed from f2933cc95f5ace319d93038c92bd92e9b6e3e3ac to 333db3c0de1e767304a8b9be2e2894038d0b3cbd

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 3 years ago by rws

  • Status changed from needs_review to needs_work

Doctest failures.

comment:12 Changed 3 years ago by git

  • Commit changed from 333db3c0de1e767304a8b9be2e2894038d0b3cbd to 9430605a17f8793efff5453966fea424e28423a0

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 3 years ago by rws

  • Status changed from needs_work to needs_review

comment:14 Changed 2 years ago by git

  • Commit changed from 9430605a17f8793efff5453966fea424e28423a0 to 8de83982441dd28b52f6f544218d48431381d8d9

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 2 years ago by rws

  • Milestone changed from sage-7.6 to sage-8.1
  • Status changed from needs_review to needs_work

Doctest failures.

comment:16 Changed 2 years ago by mderickx

  • Milestone changed from sage-8.1 to sage-duplicate/invalid/wontfix
  • Status changed from needs_work to needs_review

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

comment:17 Changed 2 years ago by jdemeyer

  • Authors Ralf Stephan deleted
  • Resolution set to duplicate
  • Reviewers set to Ralf Stephan
  • Status changed from needs_review to closed
Note: See TracTickets for help on using tickets.