Repository navigation
Conversation
Merging this PR will degrade performance by 28.83%2 warnings, 1 note
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
8c0b529 to
39bc936
Compare
ff11e70 to
f100d7d
Compare
|
GNU testsuite comparison: |
9be3124 to
d420658
Compare
This comment was marked as outdated.
This comment was marked as outdated.
|
Would it be possible to separate the refactor replacing |
|
It is very difficult since |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
|
There will be follow-up work in any case for |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as resolved.
This comment was marked as resolved.
|
@sylvestre Would you review (& merge) this? There is not part which can be separated to different PR. |
|
|
|
I worked around about hang. But it can be fixed at GNU side. |
This comment was marked as outdated.
This comment was marked as outdated.
|
#16218 was unrelated and |
|
It seems this was sometimes rebased by @sylvestre . Is this OK to merge? |
|
Last |
|
Binary size comparison: |
1 similar comment
|
Binary size comparison: |
|
Is this OK to merge? |
This comment was marked as resolved.
This comment was marked as resolved.
|
This PR is ready. |
| S::VERASE, | ||
| S::VWERASE, | ||
| S::VKILL, | ||
| S::VREPRINT, |
There was a problem hiding this comment.
on BSD, c_cc slot 7 is a spare (VERASE2 on freebsd), so everything after VREPRINT is shifted by one in stty -g, no?
There was a problem hiding this comment.
Yes. But it is impossible to add unexposed const... I worked around at loop side instead.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
I placed a default value. By the way, termios header for apple says that using spare flags is UB. Thus, we should not use it anyway.
There was a problem hiding this comment.
Slot 7 does not exist in the Apple headers:
~ $ cat $(xcrun --show-sdk-path)/usr/include/sys/termios.h | grep -B1 -A3 VREPRINT
#if !defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)
#define VREPRINT 6 /* ICANON together with IEXTEN */
#endif
/* 7 spare 1 */
#define VINTR 8 /* ISIG */There was a problem hiding this comment.
We are talking about /* 7 spare 1 */ which exists on termios struct.
There was a problem hiding this comment.
Or indeed on BSD in general:
https://github.com/openbsd/src/blob/206955fabd04e01dec733f46df729e5b33781e4a/sys/sys/termios.h#L60
There was a problem hiding this comment.
I think you can remove the comment, since it is not just that rustix doesn't expose it.
There was a problem hiding this comment.
By the way, @sylvestre 's draft PR has the code:
// Print all special codes in save format by accessing the raw cc array
// via a pointer cast, since rustix doesn't expose the inner array.
let cc_ptr = (&raw const termios.special_codes).cast::<[libc::cc_t; libc::NCCS]>();
// SAFETY: SpecialCodes is a transparent wrapper around [cc_t; NCCS]
let cc_array = unsafe { &*cc_ptr };
for cc in cc_array {
print!(":{cc:x}");
}
println!();
Since we only need 1 unexposed flag, we can use it with debug_assert!(exposed, unexposed).
I don't think it is worth to do have that unsafe just for undefined flag which is essentially UB.
There was a problem hiding this comment.
I want to leave some comments since it is easy to miskake.
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
|
Fuzzing / Fuzz (fuzz_echo) (pull_request) failure tracked by #17048. |
rustixmanages baud rate byu32on all platforms. But OS itself should support any baud to actually use any baud. This PR adds support for any baud on Linux kernel (since bsd was already supported atnixcrate).rustixhasu32-> enum decoder.