-
Notifications
You must be signed in to change notification settings - Fork 7
uint64 can exceed Nix integer range #185
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
Comments
🤔 I'll have a look a bit later this week. |
Please let me know if there's anything I can do to help. I have some experience in Go and since this related to my work, I can spend a bit of time on it. Do you know what an ideal solution to this would look like for you (if you think this should be fixed)? If you let me know I can look into implementing it Thanks for all the work you're putting into this project - facter is an extremely useful tool for me! |
@Scandiravian, I'm glad to hear you find it helpful. I will try to think through the implications for a bit today. I'll post my thoughts here. Happy to review PRs if you want to implement the fix 🙏 |
Yes. I got this error too: Cause by: $ jq '.smbios.memory_64_error[] | {array_address, device_address}' facter.json
{
"array_address": 9223372036854775808,
"device_address": 9223372036854775808
} |
A quick review of mapping from I'll spend some time today doing this and converting any explicit usages of |
@brianmcgee maybe a those addresses could be formatted as hex strings. That's also more readable and compact. |
I've just tested #193 on the R760 servers, that were experiencing the issue and the fix resolved it 😊 |
An integer in Nix is always signed, which can lead to issues when a number exceeds
2^63 - 1
.For instance, I ran nixos-facter on a Dell R760 server, which sets the value of an entry in
hardware.memory_array_mapped_address
to18446741876833779712
. This makes the nix configuration fail to build when anything references the report as JSON seems to be eagerly loaded by nix.This is clearly an edge case, but would it be possible to use strings instead of uint64 in the output for these values?
The text was updated successfully, but these errors were encountered: