Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed replace-id to prevent stack overflow on self-referencing types #55

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

Eagle941
Copy link
Contributor

@Eagle941 Eagle941 commented Dec 23, 2024

This PR fixes the bug reported in #54.

The stack overflow error is fixed by avoiding infinite calls to the function replace_type_id. A cycle detection strategy is used to detect self-referencing types and stop recursion.

A new test proves that the changes are working.

@Eagle941 Eagle941 force-pushed the stack_overflow_ids branch 4 times, most recently from 8ef8e3f to fcf36cc Compare December 23, 2024 23:38
Copy link
Contributor

@iamrecursion iamrecursion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@Eagle941 Eagle941 merged commit aa1aa40 into main Jan 14, 2025
5 checks passed
@Eagle941 Eagle941 deleted the stack_overflow_ids branch January 14, 2025 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants