miri
miri copied to clipboard
FFI implementation libc getuid on Linux
I relatively often find code I want to run with Miri that depends on libc getuid when targeting linux. At least to my mind it is a basic operating system API worthy of a miri implementation that would enable more miri code coverage.
We in fact already support getuid, but only when called from inside std... should be easy to change that to allow all code to call it.
The only hard part is a policy decision: currently it always returns 1000. Should we make it return the real ID instead? But what would that even mean when we run on a Windows host?
Awesome! I think for my purposes 1000 is sufficient. No need to over complicate it.