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
Don't test inplace_merge with libc++ #3078
Don't test inplace_merge with libc++ #3078
Conversation
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.
How about adding check of libc++
to not source code, but cmake file?
In current, the user can misunderstand like the test for inplace_merge
is success.
As I think, it is better that test_inplace_merge is not built when libc++
is used.
@@ -47,9 +47,11 @@ int hpx_main(boost::program_options::variables_map& vm) | |||
std::cout << "using seed: " << seed << std::endl; | |||
std::srand(seed); | |||
|
|||
#if !defined(_LIBCPP_VERSION) |
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.
IIUC, it's only a problem up until version 5.
Updated to allow the test with libc++ version >= 6 as it runs successully on the pycicle clang 6 builder. |
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'd suggest moving this into cmake (while disabling the test altogether) instead of making the test pass. That also allows to keep these workarounds in one spot for later changes.
…in cmake config test
6aa3945
to
980c3b2
Compare
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.
LGTM, thanks a lot!
|
||
#if defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION < 6) | ||
# error "libc++ inplace_merge implementation is broken" | ||
#endif |
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.
Instead of checking the stdlib version, couldn't we actually test if inplace_merge is actually stable?
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.
Right, that does sound like the correct thing to do. Need to make sure it's thorough enough to catch future bugs in inplace_merge
as well though, so to be honest I think the current check is simple and good enough. (libc++ is unlikely to have this bug again if they've added good tests for it, but then we need not trust them of course...)
@msimberg LGTM, too! Apart from this PR, the user can still use |
AFAICT this is not yet in any released version of libc++ so I'm ignoring the test for all versions of libc++.
I'll update this to check the version as well once the fix has been merged.
"Fixes" #2964.