-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add initial skeleton for HealthClient API in mssf_core #114
Conversation
fefb670
to
f571be0
Compare
Seems reasonable to me, for what that's worth :). |
Self { | ||
PartitionId: value.partition_id, | ||
ReplicaId: value.replica_id, | ||
HealthInformation: Box::into_raw(boxed_health_info), |
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.
Who is responsible to destroy/free the raw ptr? This is a mem leak.
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.
See the latest change - I created a utility wrapper on top of the raw COM types, which calls Box::from_raw()
in drop. There should be no mem leak according to valgrind.
Here is the valgrind output on the conversion tests on latest commit. No memory leaks detected:
|
7f668b1
to
26e9e53
Compare
26e9e53
to
a48a633
Compare
5ec17ab
to
914e7b7
Compare
Seems like u got access violation in the windows tests. The box into_raw should be unsafe code and needs special care. Also I don't know what Rust optimizer would do. |
The type conversion using From is deemed unsafe - release test failed with segfault. The latest change uses stack instead |
Add initial skeleton for HealthClient API in mssf_core with health report types and report health. Other health client functions are left as todos.