Skip to content

Fix uncaught infinite loop in coercion discovery #7420

@nthiery

Description

@nthiery

#5597 or #5598 introduced a potential infinite loop (and segfault) upon coercion discovery on a cyclic graph. The first occurence of such a graph was with the newly refactored symmetric functions.

The attached patch fixes this. By the way, it uses a dictionary rather than a list to hold the marks used (register_pair) to detect cycles.

The category patches #5981 depend on this!!!

CC: @sagetrac-sage-combinat @robertwb

Component: coercion

Author: Mike Hansen

Reviewer: Nicolas M. Thiéry, Robert Bradshaw

Merged: sage-4.3.alpha0

Issue created by migration from https://trac.sagemath.org/ticket/7420

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions