-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
Fixing problems with is_bitwise_serializable #2168
Conversation
The newly introduced switch to is_trivially_copyable introduced problems with std::true_type/false_type vs boost::mpl::true_/false_. This patch is attempting to fix those issues.
LGTM, thanks! |
What was the problem? |
It was a mixup between |
Could you be more precise? There were a number of changes in place to work only with |
specifically it was |
That still doesn't tell me much. What was the problem? Why didn't the measures in place failed (the ones reverted in this PR), were there missing in certain places? |
There was nothing reverted in this PR. you can reproduce it by running hello_world on two localities. I used clang 3.8.0 with ubsan and boost 1.60.0. However, I just discovered that the problem still seems to exist when compiling everything with asan. |
This PR reverts a bunch of I would like to know why those changes failed to avoid the issue this PR is solving. Did I miss those fixes somewhere? Which files and lines make calls that will pick the wrong overload without this patch? |
Actually, I am not convinced right now that this patch fixes the issue with the continuation serialization for good. However, the changes that you claim that got reverted are mainly because I changed all specializations of is_bitwise_serializable in the hpx codebase to return std::true_type/std::false_type so we don't need that rewrapping. As said in another comment, I encountered this problem again. However, I think this patch is valid anyway as it removed some inconsistencies wrt boost.MPL and std type_traits. |
There should be no inconsistencies between Boost.MPL and std type_traits, the code is intended to handle both. If there are, it's a bug and it should be fixed. That said, I think it's a good idea to keep the code simple by requiring |
typedef std::integral_constant<bool, | ||
hpx::traits::is_bitwise_serializable<T>::value> use_optimized; | ||
typedef typename | ||
hpx::traits::is_bitwise_serializable<T>::type use_optimized; |
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.
This (and other similar changes) should just be hpx::traits::is_bitwise_serializable<T>
, as the trait would be required to derive from std::integral_constant<bool, C>
as other traits do.
The changes made in this PR turned out to be a red herring. The commit that causes problems is f854314. We need to investigate further why this change caused problems like these: https://gist.github.com/sithhell/c5a21ae5267c53783d3899182659783d |
The newly introduced switch to is_trivially_copyable introduced problems with
std::true_type/false_type vs boost::mpl::true_/false_. This patch is attempting
to fix those issues.