-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
implement fadvise for linux #8301
Conversation
9c24722
to
07bd194
Compare
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 |
Hmm, it works for me. I tried running the attached test case under qemu and the parameters look ok. |
Weird. I'm running the test binary with
the advice should be |
Well fuck me (and SPARC as a whole), that's the only 64bit platform where |
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
bcc098f
Compare
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is going on with indentation here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well that's what zig fmt
produces.
@vrischmann @LemonBoy I'm unfortunately having to touch the |
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 ? |
@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. |
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. |
I don't know what changed but when built for It looks like we could just disregard that special case now. |
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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.