-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rollup of 9 pull requests #120231
Rollup of 9 pull requests #120231
Conversation
The `ret1` and `ret2` return values from lend operations are returned in $a1 and $a2. This function incorrectly pulled them from $a6 and $a7, causing them to always be `0`. Signed-off-by: Sean Cross <[email protected]>
The amount of memory allocated was multiplied by sizeof::<T>(), so the amount of memory to be freed should also be multiplied by sizeof::<T>(). Signed-off-by: Sean Cross <[email protected]>
Fix a deadlock condition that can occur when a thread is awoken in between the point at which it checks its wake state and the point where it actually waits. This change will cause the waker to continuously send Notify messages until it actually wakes up the target thread. Signed-off-by: Sean Cross <[email protected]>
Rework the Condvar implementation on Xous to ensure notifications are not missed. This involves keeping track of how many times a Condvar timed out and synchronizing based on that. Signed-off-by: Sean Cross <[email protected]>
When updating memory flags via `update_memory_flags()`, ensure we multiply the slice length by the element size to get the full memory size. Signed-off-by: Sean Cross <[email protected]>
Use blocking scalars when unlocking a mutex. This ensures that mutexes are unlocked immediately rather than dangling. Signed-off-by: Sean Cross <[email protected]>
Add more checks to RwLock on Xous. As part of this, ensure the variable is in a good state when unlocking. Additionally, use the global `yield_now()` rather than platform-specific `do_yield()`. Signed-off-by: Sean Cross <[email protected]>
Use the global queue implementation of Once when running on Xous. This gets us a thread-safe implementation, rather than using the non-threadsafe `unsupported` implementation. Signed-off-by: Sean Cross <[email protected]>
When running tests, libstd gets implemented as a second library. Due to this fact, the `create()` and `destroy()` functions come from different libraries. To work around this, stash the `destroy_tls()` pointer in the first unused slot in the thread local storage pool. That way even if the destruction comes from a different version of libstd, the correct `DTORS` list will be consulted. Signed-off-by: Sean Cross <[email protected]>
When using the testing framework, a second copy of libstd is built and linked. Use a global symbol for the `DLMALLOC` variable and mark it as `extern` when building as a test. This ensures we only have a single allocator even when running tests. Signed-off-by: Sean Cross <[email protected]>
This is an initial commit of network support for Xous. On hardware, is backed by smoltcp running via a Xous server in a separate process space. This patch adds TCP and UDP client and server support as well as DNS resolution support using the dns Xous server. Signed-off-by: Sean Cross <[email protected]>
Ensure these structs have a well-defined ABI layout. Signed-off-by: Sean Cross <[email protected]>
Use constants for the opcodes when writing to stdout or stderr. There still is no stdin operation. Signed-off-by: Sean Cross <[email protected]>
The thread wrapper function never returns, so we can mark it as divergent. Signed-off-by: Sean Cross <[email protected]>
Albeit not documented, macOs also support negative value for the backlog argument. ref: https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/kern/uipc_socket.c#L1061
Introduce split_at_checked and split_at_mut_checked methods to slices types (including str) which are non-panicking versions of split_at and split_at_mut respectively. This is analogous to get method being non-panicking version of indexing.
This increases the maximum supported file size (previously limited to 4GB) and avoids potential issues with u32 to u64 conversions, which are no longer needed. Signed-off-by: onur-ozkan <[email protected]>
As is already done in `rustc_span` and `rustc_data_structures`.
This makes no sense, and has no effect. I suspect it's been confused with a `code = "{code}"` attribute on a subdiagnostic suggestion, where it is valid (but the "code" there is suggested source code, rather than an error code.)
Error codes are integers, but `String` is used everywhere to represent them. Gross! This commit introduces `ErrCode`, an integral newtype for error codes, replacing `String`. It also introduces a constant for every error code, e.g. `E0123`, and removes the `error_code!` macro. The constants are imported wherever used with `use rustc_errors::codes::*`. With the old code, we have three different ways to specify an error code at a use point: ``` error_code!(E0123) // macro call struct_span_code_err!(dcx, span, E0123, "msg"); // bare ident arg to macro call \#[diag(name, code = "E0123")] // string struct Diag; ``` With the new code, they all use the `E0123` constant. ``` E0123 // constant struct_span_code_err!(dcx, span, E0123, "msg"); // constant \#[diag(name, code = E0123)] // constant struct Diag; ``` The commit also changes the structure of the error code definitions: - `rustc_error_codes` now just defines a higher-order macro listing the used error codes and nothing else. - Because that's now the only thing in the `rustc_error_codes` crate, I moved it into the `lib.rs` file and removed the `error_codes.rs` file. - `rustc_errors` uses that macro to define everything, e.g. the error code constants and the `DIAGNOSTIC_TABLES`. This is in its new `codes.rs` file.
…int_with_diagnostics`.
…emit_span_lint`.
core: introduce split_at{,_mut}_checked Introduce split_at_checked and split_at_mut_checked methods to slices types (including str) which are non-panicking versions of split_at and split_at_mut respectively. This is analogous to get method being non-panicking version of indexing. - rust-lang/libs-team#308 - rust-lang#119128
exclude unexported macro bindings from extern crate Fixes rust-lang#119301 Macros that aren't exported from an external crate should not be defined. r? `@petrochenkov`
…k, r=Mark-Simulacrum xous: misc fixes + add network support This patchset makes several fixes to Xous support. Additionally, this patch adds networking support. Many of these fixes are the result of the recent patch to get `unwinding` support merged. As a result of this patch, we can now run rust tests. As a result of these tests, we now have 729 tests passing: ``` failures: env::tests::test env::tests::test_self_exe_path env::tests::vars_debug env::tests::vars_os_debug os::raw::tests::same path::tests::test_push path::tests::test_set_file_name time::tests::since_epoch test result: FAILED. 729 passed; 8 failed; 1 ignored; 0 measured; 0 filtered out; finished in 214.54s ``` In the course of fixing several tests and getting the test sequence to reliably run, several issues were found. This patchset fixes those issues.
std::net: bind update for using backlog as `-1` too. Albeit not documented, macOs also support negative value for the backlog argument. ref: https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/kern/uipc_socket.c#L1061
…fn_fix, r=TaKO8Ki Make `unsafe_op_in_unsafe_fn` migrated in edition 2024 fixes rust-lang#119823
Add `ErrCode` Error codes are integers, but `String` is used everywhere to represent them. Gross! This commit introduces `ErrCode`, an integral newtype for error codes, replacing `String`. The commit also introduces constants like `E0123` for all the used error codes. r? `@estebank`
…rk-Simulacrum remote-test: use u64 to represent file size Currently, triggering a transfer of data exceeding the size of 4294967295 bytes results in a panic on the `remote-test-server` as `io::copy(&mut file, dst) failed with Connection reset by peer (os error 104)`. This issue happens because the size is transmitted as u32 to `remote-test-server`. First commit increases the supported file size. But I am not sure about its necessity — can we realistically encounter file sizes exceeding 4GB in builds, perhaps through some complicated configurations? ~The second commit adds a sanity check to avoid encountering the error `io::copy(&mut file, dst) failed with Connection reset by peer (os error 104)` on the `remote-test-server` side.~
…rrors Fix naming in the lint API Methods for emit lints are named very inconsistently. This PR fixes that up. r? `@compiler-errors`
…time-binders-in-rtn, r=fmease Don't actually make bound ty/const for RTN Avoid creating an unnecessary non-lifetime binder when we do RTN on a method that has ty/const params. Fixes rust-lang#120208 r? oli-obk
@bors r+ rollup=never p=9 |
🔒 Merge conflict This pull request and the master branch diverged in a way that cannot be automatically merged. Please rebase on top of the latest master branch, and let the reviewer approve again. How do I rebase?Assuming
You may also read Git Rebasing to Resolve Conflicts by Drew Blessing for a short tutorial. Please avoid the "Resolve conflicts" button on GitHub. It uses Sometimes step 4 will complete without asking for resolution. This is usually due to difference between how Error message
|
Successful merges:
-1
too. #119943 (std::net: bind update for using backlog as-1
too.)unsafe_op_in_unsafe_fn
migrated in edition 2024 #119948 (Makeunsafe_op_in_unsafe_fn
migrated in edition 2024)ErrCode
#119972 (AddErrCode
)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup