-
Notifications
You must be signed in to change notification settings - Fork 187
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
Libuv 1.44.0 uv_os_get_passwd signed -> unsigned change breaks our binding #589
Comments
Relevant Libuv change: libuv/libuv#3476 Might need to change those comparisons for Made a comment on the Libuv PR: libuv/libuv#3476 (comment) |
squeek502
changed the title
LGTM alerts
Libuv 1.44.0 uv_os_get_passwd signed -> unsigned change breaks our binding
Mar 12, 2022
squeek502
added a commit
to squeek502/luv
that referenced
this issue
Mar 12, 2022
In Libuv 1.44.0, uv_passwd_t.uid/gid was changed to be unsigned, so the >= 0 check would always return true. Changing to compare against -1 explicitly fixes luvit#589 while still maintaining correct functionality when built against previous Libuv versions. Note that with Libuv 1.44.0 and above, this relies on implicitly casting -1 to unsigned long (the type of `uv_passwd_t.uid`/`uv_passwd_t.gid`).
squeek502
added a commit
that referenced
this issue
Mar 12, 2022
…590) In Libuv 1.44.0, uv_passwd_t.uid/gid was changed to be unsigned, so the >= 0 check would always return true. Changing to compare against -1 explicitly fixes #589 while still maintaining correct functionality when built against previous Libuv versions. Note that with Libuv 1.44.0 and above, this relies on implicitly casting -1 to unsigned long (the type of `uv_passwd_t.uid`/`uv_passwd_t.gid`).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After libuv version v1.44.0, we got two alerts. see.
The text was updated successfully, but these errors were encountered: