-
Notifications
You must be signed in to change notification settings - Fork 69
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
Deep recursion when running LoopParamOver test ? #3146
Comments
This recursion comes from the evaluation logic. The logic to identify circular dependence is based on it reaching 1000 attempts without success. |
That sounds dangerous and problematic. Doesn't the usual 'no change in the last iteration' be sufficient ? |
Surelog/src/DesignCompile/CompileHelper.cpp Lines 78 to 82 in 103bf15
I have to reduce the limit down to 100 for Windows since the stack doesn't grow automatically as it does for Linux. The current stack size on Windows is 64 MB and with that limit only 100 iterations were possible. The situation is worse for Clang since the stack requirement for Clang is larger than both cl and gcc. |
Yes, but I am just stating the facts. The current implementation relies on number of attempts to evaluate. Sure, there is lot of room to improve on this logic. |
The correct fix requires way too many changes in all the functions involved in expression evaluation both on the UHDM and Surelog side. Just for the sake of detecting an error condition that is far from the norm. Maybe limiting to 100 when running valgrind would be enough? We are attempting here to run valgrind on a negative test that is built to create a corner case behavior. Not the typical usage... |
The difference in number of allowed iterations (100 for Windows & 1000 for others) is the reason for current build failures in CI. The number of @alaindargelas How do you want to deal with this? |
Create 2 log files, that is what is typically done. One per OS when there is OS specific diffs. |
The
LoopParamOver
test crashes when running in debug mode or address sanitizer mode due to a very deep stack, which looks like a super-deep recursion (see below).It might not show up in optimized mode as the stack-frames are probably smaller.
But given that the input is:
... it is unclear where the deep recursion of more than 1000 frames is coming from
The text was updated successfully, but these errors were encountered: