Fix incorrect constant for O_LARGEFILE on mips64-linux-musl#2875
Merged
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Amanieu (or someone else) soon. Please see the contribution instructions for more information. |
JohnTitor
approved these changes
Aug 15, 2022
Member
|
Thanks for the detailed explanation, I also confirmed the value on the musl source: https://github.com/bminor/musl/blob/cfdfd5ea3ce14c6abf7fb22a531f3d99518b5a1b/arch/mips64/bits/fcntl.h#L16 cc @Grommish the value is going to be changed as the value is incorrect. @bors r+ |
Contributor
Contributor
bors
added a commit
that referenced
this pull request
Aug 15, 2022
Fix incorrect constant for O_LARGEFILE on mips64-linux-musl
Changes `O_LARGEFILE` from `0` to `0x2000`
Bash script used for ensuring constant is correct:
```sh
#!/bin/bash
echo "
#include <fcntl.h>
int largefile() {
return O_LARGEFILE;
}
" | mips64-linux-musl-gcc -c -O2 musl_o_largefile.c -o temp.o
mips64-linux-musl-objdump -d temp.o | grep -A2 largefile
```
Output:
```asm
0000000000000000 <largefile>:
0: 03e00008 jr ra
4: 24022000 li v0,8192 ; 0x2000
```
Link to relevant portion of kernel source, shows that it should match mips32 musl (which currently has a value of 0x2000 as well).
I believe the reason #2738 had this value incorrect was because it's 0 for glibc on mips64 (to specify it's the default, I believe).
Contributor
|
💥 Test timed out |
Member
|
@bors retry |
Contributor
Contributor
|
☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
O_LARGEFILEfrom0to0x2000Bash script used for ensuring constant is correct:
Output:
Link to relevant portion of kernel source, shows that it should match mips32 musl (which currently has a value of 0x2000 as well).
I believe the reason #2738 had this value incorrect was because it's 0 for glibc on mips64 (to specify it's the default, I believe).