miri icon indicating copy to clipboard operation
miri copied to clipboard

FFI implementation libc getuid on Linux

Open pcwizz opened this issue 1 year ago • 2 comments

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.

pcwizz avatar Jul 18 '24 09:07 pcwizz

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?

RalfJung avatar Jul 18 '24 09:07 RalfJung

Awesome! I think for my purposes 1000 is sufficient. No need to over complicate it.

pcwizz avatar Jul 18 '24 09:07 pcwizz