Opened 8 years ago

Last modified 6 years ago

#12216 new defect

Coercion to CC via _complex_mpfr_field_ can lead to infinite loop

Reported by: mraum Owned by: robertwb
Priority: major Milestone: sage-6.4
Component: coercion Keywords: CC, LazyWrapper
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

I encountered this when working on #9439. Creating an element with parent and providing the method _complex_mpfr_field_ for conversion into CC can lead to an infinite loop, if said method returns a non-trivial element of CC.

I couldn't find a minimal example, but as I said it occured when I worked on #9439, where points in HH should be convertible into CC.

The reason seems to be that the coercion framework tries to use CLF first. The application of the corresponding LazyWrapperMorphism? leads to an element of CLF, that then cannot be evaluated correctly, because .eval of this elements calls CC._element_constructor_, which in turn calls .eval of that element (via _complex_mpfr_field_ of this element).

Change History (4)

comment:1 Changed 7 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:2 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:3 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:4 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.