-
-
Notifications
You must be signed in to change notification settings - Fork 427
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
Unable to use component clients as action return types #2150
Comments
I was fixing a lot of those recently, I wonder why this wasn't caught in The idea is indeed that clients should behave, semantically, like a future. |
I think that I have found the cause of the segfault. The invalid cast is on line 931 in If I am not mistaken, there is no relation between these two types which would explain the error. Since component client are just wrappers around id_type (Please correct me if I am wrong.) my guess would be that HPX unwraps the ID to transfers it and then forgets to rewrap it on the call site. I will continue my investigation and try to find why this is not happening. |
@sithhell I have found another suspicious cast on line 336 in continuation.hpp. The dynamic type of the continuation is |
Thanks! I fixed a lot of those recently, it's a little complicated... I |
@hkaiser This fixes the issue for me. Thanks! |
If one is using an arbitrary component client type as the return type of an action, HPX (commit 6f3e89a) segfaults while constructing the result future. I could trace back the root of the segfault to an invalid cast in
continuation.hpp
via UBSan. Unfortunately, I wasn't able to pinpoint the exact location yet.My best guess would be that one of the future specializations is called spuriously since
hpx::traits::is_future
is derived fromboost::mpl::true_
for all component client types. This also causes a compiler error if the action is invoked directly. In this case, HPX will try to return the result as a future while the actual return type is the client type itself (basic_action.hpp
, line 305).Specializing
is_future
explicitly and deriving it fromboost::mpl::false_
fixes both issues but I am not sure if this doesn't break other code.The behaviour should be reproducible using the following code:
The text was updated successfully, but these errors were encountered: