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

opt: fix memo cycle test in dbg builds #107202

Closed
wants to merge 1 commit into from

Conversation

mgartner
Copy link
Collaborator

@mgartner mgartner commented Jul 19, 2023

In #106944 the dbg compilation mode became the default for all
non-release builds. This caused stack overflows in the memo cycle
detection tests, which excessive invoke recursive functions, likely
because stack frames are larger in dbg mode than in opt mode or
because certain optimizations aren't performed in dbg mode that reduce
stack depth due to recursion, like inlining.

This commit fixes the test by lowering the cycle detection limit, making
it so that a cycle is detected before a stack overflow occurs.

Epic: None

Release note: None

@mgartner mgartner requested a review from a team as a code owner July 19, 2023 19:45
@cockroach-teamcity
Copy link
Member

This change is Reviewable

In cockroachdb#106944 the `dbg` compilation mode became the default for all
non-release builds. This caused stack overflows in the memo cycle
detection tests, which excessive invoke recursive functions, likely
because stack frames are larger in `dbg` mode than in `opt` mode or
because certain optimizations aren't performed in `dbg` mode that reduce
stack depth due to recursion, like inlining.

This commit fixes the test by lowering the cycle detection limit, making
it so that a cycle is detected before a stack overflow occurs.

Epic: None

Release note: None
Copy link
Collaborator

@rharding6373 rharding6373 left a comment

Choose a reason for hiding this comment

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

:lgtm: Thanks for the quick fix!

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @michae2 and @rickystewart)

@mgartner
Copy link
Collaborator Author

This may not be necessary once #107207 is merged.

@mgartner
Copy link
Collaborator Author

#107207 fixed the test failure, so I'll close this.

@mgartner mgartner closed this Jul 19, 2023
@mgartner mgartner deleted the fix-memo-cycle branch July 24, 2023 21:49
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.

4 participants