Skip to content
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 #120239

Merged
merged 32 commits into from
Jan 22, 2024
Merged

Rollup of 9 pull requests #120239

merged 32 commits into from
Jan 22, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

xobs and others added 30 commits January 13, 2024 09:13
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]>
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]>
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
…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.~
…ttern, r=oli-obk

add help message for `exclusive_range_pattern` error

Fixes rust-lang#120047

this error
```
error[E0658]: exclusive range pattern syntax is experimental
 --> src/lib.rs:3:9
  |
3 |         0..42 => {},
  |         ^^^^^
  |
  = note: see issue rust-lang#37854 <rust-lang#37854> for more information
  = help: use an inclusive range pattern, like N..=M
  ```
now includes a help message

Not sure of proper procedure here but this seemed like a good help message (used the one suggested in the original issue), if you have a idea for one that is better or something I missed please comment!
…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
Fix -Zremap-path-scope typo

This fixes a documentation typo from rust-lang#115214 where `-Zremap-path-prefix=object` should be `-Zremap-path-scope=object`.

```@rustbot``` label: +F-trim-paths
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jan 22, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=9

@bors
Copy link
Contributor

bors commented Jan 22, 2024

📌 Commit 44e44f4 has been approved by matthiaskrgr

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 22, 2024
@bors
Copy link
Contributor

bors commented Jan 22, 2024

⌛ Testing commit 44e44f4 with merge 021861a...

@bors
Copy link
Contributor

bors commented Jan 22, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 021861a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 22, 2024
@bors bors merged commit 021861a into rust-lang:master Jan 22, 2024
12 checks passed
@rustbot rustbot added this to the 1.77.0 milestone Jan 22, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#118578 core: introduce split_at{,_mut}_checked 9f0d1b068fc213127e7cd666e1579b807709aed6 (link)
#119369 exclude unexported macro bindings from extern crate 631b316055d3ab8161589f9b7cf9c0ce6dd654ae (link)
#119408 xous: misc fixes + add network support 52032c85d6fd19d7b40bb15a8a68ecfcd9e5d4f8 (link)
#119943 std::net: bind update for using backlog as -1 too. 9ddd0f195602144b2fe28033887eddac09551e21 (link)
#119948 Make unsafe_op_in_unsafe_fn migrated in edition 2024 9a6a7db3a96d61cdd72ba7824a5457443f78547a (link)
#119999 remote-test: use u64 to represent file size d2605860f0b0e86d1774d13cdb58440766b43eb9 (link)
#120152 add help message for exclusive_range_pattern error 05198ade8d8f5303e438944bef256e9cfbfea521 (link)
#120213 Don't actually make bound ty/const for RTN 0ef5156293ac17af41a9c4ecee6595af1f05f8c3 (link)
#120225 Fix -Zremap-path-scope typo a071e05952358f2569a5f9bc1f55dbda692e1737 (link)

previous master: 3066253050

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (021861a): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.4% [-0.4%, -0.4%] 1
Improvements ✅
(secondary)
-1.4% [-1.4%, -1.4%] 1
All ❌✅ (primary) -0.4% [-0.4%, -0.4%] 1

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
6.0% [2.3%, 12.1%] 3
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-3.9% [-4.7%, -3.0%] 2
Improvements ✅
(secondary)
-3.7% [-4.2%, -3.2%] 2
All ❌✅ (primary) 2.0% [-4.7%, 12.1%] 5

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.2%] 29
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.2% [-0.3%, -0.0%] 13
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.0% [-0.3%, 0.2%] 42

Bootstrap: 664.769s -> 662.903s (-0.28%)
Artifact size: 308.37 MiB -> 308.40 MiB (0.01%)

@matthiaskrgr matthiaskrgr deleted the rollup-vqjn6ot branch March 16, 2024 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. O-unix Operating system: Unix-like rollup A PR which is a rollup S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.