toot.cat is one of the many independent Mastodon servers you can use to participate in the fediverse.
On the internet, everyone knows you're a cat — and that's totally okay.

Administered by:

Server stats:

414
active users

Finished my day job, so I can come back to fixing my personal projects. And this time, I have a "funny" story! :3

Just fixed a segfault in my Rust sysinfo crate on FreeBSD. So, apparently, in some FreeBSD types, a pointer isn't actually a pointer but a kernel pointer. So to get access to the data, you need to use kvm_read function... And it might return types that also have kernel pointers and so on.

Lost a few hours trying to understand why my non-null pointers were out of my memory to discover by reading FreeBSD source code what was going on (because if there is documentation about this, didn't find it).

Anyway, I think this whole API is awful. FreeBSD making breaking changes in structs layout between each version is also a nightmare. Of all platforms I wrote Rust bindings for, this is the worst by far.

PR is here: github.com/GuillaumeGomez/sysi

Fixes #1497.
GitHubFix segfault on FreeBSD by GuillaumeGomez · Pull Request #1499 · GuillaumeGomez/sysinfoBy GuillaumeGomez
Public

@imperio How do you test on FreeBSD?

Public

@hywan virtual machine