-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fix Stat Syscall #19
Comments
We talked about this briefly at some point with @JustinCappos and I'm tagging him to clarify. The struct thats actually passed to the native kernel has a defined structure, and we want to match that. I believe the best way is to change the libc struct to match? |
Why is this the case? Isn't glibc what is used by Rust's libc which rawposix calls? |
rawposix has its own statData definition (https://github.com/Lind-Project/RawPOSIX/blob/main/src/interface/types.rs#L55) |
When implementing RawPOSIX, there were conflicts between NaCl |
Right, that makes sense. There is most likely problems with the struct layout when translating from 32 to 64 bit, hence the weird nacl layout. |
@robinyuan1002 this issue got fixed in the last merge, correct? |
@rennergade there is still a minor issue with stat stuff when compile bash, so I guess let's leave this issue until this has been figured out |
@rennergade Yes, the problem of 64bit and 32bit is solved for stat. |
The stat struct in glibc does not match rawposix. This causes the value assigned to stat struct in rawposix failed to update in glibc. Now all the testsuite that is using stat-related syscalls are running and will not yield any error, but the information in stat struct is incorrectly updated.
I've talked with Alice about this, and in nacl, there seems to be some kind of transformation happened in nacl runtime on stat struct to make it work. And after discussion with Nick, we decided to make the stat struct in rawposix match glibc, so no extra steps should be involved in wasmtime.
The text was updated successfully, but these errors were encountered: