Uh oh!
There was an error while loading. Please reload this page.
implement fadvise for linux - #8301
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
9c24722 to
07bd194Comparevrischmann
commented
Mar 20, 2021
I can't test on a real sparc machine but I'm assuming it's broken given the strace output. If I make it use |
LemonBoy
commented
Mar 20, 2021
Hmm, it works for me. I tried running the attached test case under qemu and the parameters look ok. |
vrischmann
commented
Mar 20, 2021
Weird. I'm running the test binary with the advice should be |
LemonBoy
commented
Mar 21, 2021
Well fuck me (and SPARC as a whole), that's the only 64bit platform where |
vrischmann
commented
Mar 22, 2021
I added the workaround and a comment in the latest commit. For some reason one check is still shown as pending, but it finished successfully. |
9e162a1 to
bcc098fComparevrischmann
commented
May 30, 2021
I noticed the offset/len types changed with 31f1cc9 so I changed it here too. Also rebased on latest master. |
| pub const POSIX_FADV_DONTNEED = 6; | ||
| pub const POSIX_FADV_NOREUSE = 7; | ||
| } | ||
| else |
There was a problem hiding this comment.
what is going on with indentation here?
There was a problem hiding this comment.
well that's what zig fmt produces.
alexrp
commented
Jun 23, 2024
@vrischmann@LemonBoy I'm unfortunately having to touch the |
vrischmann
commented
Jun 23, 2024
Hi @alexrp. Sorry, I can't remember the details but I tested this code again right now and it looks like it works ? maybe you're right and it was a qemu bug ? |
alexrp
commented
Jun 23, 2024
@vrischmann just to clarify, is that actually testing with a call to Also, did you actually observe it having visibility broken behavior? Now I'm wondering if it could just have been an earlier version of |
not sure I understand the question, the code calls
Sadly I can't remember if there was a broken test case or something. |
alexrp
commented
Jun 23, 2024
That's exactly what I was getting at. 🙂 For testing purposes, you'd need to either undo the special case (or do a raw syscall I guess).
I think so, yes. I can't find any evidence in Linux, glibc, or musl sources that indicate that it should be necessary. The two libcs have no special-casing for SPARC for this system call, and the two system calls end up in the same core function in the kernel. |
vrischmann
commented
Jun 23, 2024
I don't know what changed but when built for It looks like we could just disregard that special case now. |
alexrp
commented
Jun 23, 2024
Hm, ok, I'll go ahead and remove that case then. Thanks for the assistance! |
This does not seem to be needed anymore, and it's unclear if it was ever truly needed or if it was just there to deal with a QEMU/strace bug. See: ziglang#8301 (comment)
Continuation of #8095 but I forced-push and GitHub doesn't allow me to reopen the PR.
I think I took care of all special cases for the architectures that work in zig today.