-
Notifications
You must be signed in to change notification settings - Fork 154
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
Resolve failures on SLES #2002
Resolve failures on SLES #2002
Conversation
Please always update year in Copyright if it is not 2024. |
@@ -369,6 +369,8 @@ TEST(DecisionTree, DecisionTreeBatch) | |||
using SizeInRange = Predicates::Contraction::SizeInRange; | |||
using Range = Predicates::Contraction::Range; | |||
using And = Predicates::And<ContractionProblem>; | |||
using Key = std::array<float, 4>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure how Key works, but Key is used at line 374. Isn't it a problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dimension of key should be greater than or equal to the number of features (or features.size()
(however, maybe someone more familiar with solution selection could confirm).
The last test was added along with the additional feature but the Key
was reused from previous tests where the size was 3. This caused a segfault which is unsuprising because we are trying to access the fourth element of a size three array. What may be a surprise is that this is only an issue on SLES. However, this is UB and the compiler is free to do what it wants. It is possible that this code was optimized out on the other platforms.
As for line 342, we are shadowing the Key
definition that is at the top of the file. Perhaps we should move these aliases into each of the test cases.
@nakajee @bstefanuk please resolve comments. |
Thanks for your update. |
In addition to local testing I ran in a manual pipeline and everything looks good. Once this is merged I will enable sles testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your comment.
Looks good.
These changes solve test failures in SLES containers when running TensileTests.
Fixes
getFile
. The other function achieves the same outcome but does not depend on boost optional which seems to cause a segfault when initializing in the context of this code.