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

Classlib: Prevent possible infinite recursion in *initClassTree #5575

Merged

Conversation

jamshark70
Copy link
Contributor

Purpose and Motivation

Fixes #5574 by moving classesInited.add(aClass); to precede the potentially recursive call.

This test case does hang the interpreter without the fix, and doesn't hang it with the fix.

Kaboom {
	*initClass {
		Class.initClassTree(this);
	}
}

Types of changes

  • Bug fix

To-do list

  • Code is tested
  • All tests are passing
  • This PR is ready for review

I can't imagine a good way to unit-test this.

@jamshark70 jamshark70 added bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: class library SC class library crash things which cause a crash in the interpreter, servers, or IDE. do not use for PRs labels Sep 25, 2021
@dyfer dyfer merged commit 6c109e8 into supercollider:develop Oct 5, 2021
@dyfer dyfer mentioned this pull request Oct 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that relate to unexpected/unwanted behavior. Don't use for PRs. comp: class library SC class library crash things which cause a crash in the interpreter, servers, or IDE. do not use for PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hanging risk in Class *initClassTree
3 participants