Skip to content
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

[Bug] Liveliness token keyexpr is not registered properly #890

Closed
pdematteis opened this issue Feb 7, 2025 · 1 comment · Fixed by #891
Closed

[Bug] Liveliness token keyexpr is not registered properly #890

pdematteis opened this issue Feb 7, 2025 · 1 comment · Fixed by #891
Assignees
Labels
bug Something isn't working

Comments

@pdematteis
Copy link

Describe the bug

_z_declare_liveliness_token() in net/liveliness.c is supposed to register tokens in the _local_tokens map by using _z_liveliness_register_token().

For this, the following code is used: _z_liveliness_register_token(_Z_RC_IN_VAL(zn), id, keyexpr);
Unfortunately at this point the keyexpr is empty, since it has been stolen by _z_make_decl_token() -> _z_keyexpr_steal().

The following code should work better: _z_liveliness_register_token(_Z_RC_IN_VAL(zn), id, &declaration._body._decl_token._keyexpr);

Do you confirm?
Thanks.

To reproduce

.

System info

.

@pdematteis pdematteis added the bug Something isn't working label Feb 7, 2025
@sashacmc sashacmc self-assigned this Feb 7, 2025
@sashacmc
Copy link
Member

sashacmc commented Feb 7, 2025

Thanks @pdematteis!
I can confirm that it is a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants