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 7 pull requests #128039

Closed
wants to merge 21 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

alexcrichton and others added 21 commits July 19, 2024 10:06
This commit updates the `wasi-sdk` download used by the `wasm32-wasi*`
targets. The motivation for this commit is generally just "keep things
up to date" and is not intended to cause any issues or differences from
before, just a routine update.
The updated wasi-sdk has debuginfo by default so be sure to strip the
debuginfo by default when testing the size of new executables.
The existing implementation uses Python to launch a set of Rust-written
binaries. Unfortunately, this is currently broken; it seems that some
updates meant it no longer compiles.

There is also a problem that support for more float types (`f16`,
`f128`) would be difficult to add since this is very specialized to
`f32` and `f64`.

Because of these sortcomings, migrate to a version written in Rust. This
version should be significantly faster; test generators can execute in
parallel, and test cases are chunked and parallelized. This should also
resolve the preexisting "... the worker processes are leaked and stick
around forever" comment.

This change also introduces genericism over float types and properties,
meaning it will be much easier to extend support to newly added types.

`num::BigRational` is used in place of Python's fractions for
infinite-precision calculations.
Since `test-float-parse` is now implemented in Rust, we can move it into
the global workspace and check dependency licenses.
With updates to `test-float-parse`, it is now possible to run as another
Rust tool. Enable check, clippy, and test.

Test runs the unit tests, as well as shorter parsing tests (takes
approximately 1 minute).
The `.item-table` class is used to display name+description lists, e.g.
the exported functions, as a table. If the names are long and the
descriptions are short, then the width of the table does not expand to
the whole size, but only uses a fraction. This causes a some names to
break inside a word.

This change makes the table always use 100% of its parent width. The
`.width-limiter` wrapper already ensures that the used width still does
not become excessive.

Signed-off-by: René Kijewski <[email protected]>
When the system is using a non-UTF-8 locale, the value will indeed not
be UTF-8. That sucks for everyone involved, but is no reason for panic.
We can "handle" this gracefully by just using from lossy, replacing the
invalid UTF-8 with the ? and keeping the accidentally valid UTF-8.
Good luck when debugging, but at least it's not a crash.

We already do this for `strerror_r`.
With the previous improvements, it is now possible to run float parsing
tests as part of CI. Enable it here.

This only runs a subset of tests, which takes about one minute.
…r=Mark-Simulacrum

Rewrite `test-float-parse` in Rust

Migrate from the currently broken Rust + Python `test-float-parse` to a Rust implementation. This newer version should be significantly faster (tests execute in parallel with threads, rather than series across multiple processes, which also eliminates the "...the worker processes are leaked and stick around forever" message), and should be significantly easier to extend to the new float types.

Since this is faster and hopefully more stable, we should be able to launch it with `x` and run the faster tests in CI.
Deal with invalid UTF-8 from `gai_strerror`

When the system is using a non-UTF-8 locale, the value will indeed not be UTF-8. That sucks for everyone involved, but is no reason for panic. We can "handle" this gracefully by just using from lossy, replacing the invalid UTF-8 with � and keeping the accidentally valid UTF-8. Good luck when debugging, but at least it's not a crash.

We already do this for `strerror_r`.

fixes rust-lang#127563
…rk-Simulacrum

Update wasi-sdk in CI to latest release

This commit updates the `wasi-sdk` download used by the `wasm32-wasi*` targets. The motivation for this commit is generally just "keep things up to date" and is not intended to cause any issues or differences from before, just a routine update.
… r=notriddle

Fix stab display in doc blocks

Went across this bug randomly:

![Screenshot from 2024-07-20 22-09-49](https://github.com/user-attachments/assets/89fdf427-b00e-4fcb-9d57-078bcb1bacd9)

With the fixed CSS:

![Screenshot from 2024-07-20 22-10-14](https://github.com/user-attachments/assets/eda9a1a6-6a12-408f-bd3a-25bb3397d163)

r? ``@notriddle``
…xyUwU

Just totally fully deny late-bound consts

Kinda don't care about supporting this until we have where clauses on binders. They're super busted and should be reworked in due time, and they are approximately 100% useless until then 😸

Fixes rust-lang#127970
Fixes rust-lang#127009

r? `@BoxyUwU`
rustdoc: short descriptions cause word-breaks in tables

The `.item-table` class is used to display name+description lists, e.g. the exported functions, as a table. If the names are long and the descriptions are short, then the width of the table does not expand to the whole size, but only uses a fraction. This causes a some names to break inside a word.

This change makes the table always use 100% of its parent width. The `.width-limiter` wrapper already ensures that the used width still does not become excessive.

See e.g. <https://docs.rs/mathlab/0.3.0/mathlab/fun/vec_num/index.html> or <https://docs.rs/cw-events/0.0.9/cw_events/> (random choices out of the list of the recent releases).

[![](https://i.imgur.com/XnH4eeT.png)](https://imgur.com/XnH4eeT) [![](https://i.imgur.com/7iQ9xE2.png)](https://imgur.com/7iQ9xE2)

The problem occurs (at least) in Firefox 130, Falkon 24, and Konqueror 22. It does not occur in Chrome 126.
… r=compiler-errors

Explain why we require `_` for empty patterns

This adds a note to the "non-exhaustive patterns" diagnostic to explain why we sometimes require extra `_` patterns on empty types. This is one of the two diagnostic improvements I wanted to do before [stabilizing `min_exhaustive_patterns`](rust-lang#122792).

r? `@compiler-errors`
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs 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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 21, 2024
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jul 21, 2024
@bors
Copy link
Contributor

bors commented Jul 21, 2024

⌛ Testing commit a742abe with merge 24c72ea...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 21, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#127510 (Rewrite `test-float-parse` in Rust)
 - rust-lang#127583 (Deal with invalid UTF-8 from `gai_strerror`)
 - rust-lang#127977 (Update wasi-sdk in CI to latest release)
 - rust-lang#128014 (Fix stab display in doc blocks)
 - rust-lang#128020 (Just totally fully deny late-bound consts)
 - rust-lang#128023 (rustdoc: short descriptions cause word-breaks in tables)
 - rust-lang#128033 (Explain why we require `_` for empty patterns)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-msvc-ext failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Contributor

bors commented Jul 21, 2024

💔 Test failed - checks-actions

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

@bors retry

@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 Jul 21, 2024
@bors
Copy link
Contributor

bors commented Jul 21, 2024

⌛ Testing commit a742abe with merge 71690ee...

bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 21, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#127510 (Rewrite `test-float-parse` in Rust)
 - rust-lang#127583 (Deal with invalid UTF-8 from `gai_strerror`)
 - rust-lang#127977 (Update wasi-sdk in CI to latest release)
 - rust-lang#128014 (Fix stab display in doc blocks)
 - rust-lang#128020 (Just totally fully deny late-bound consts)
 - rust-lang#128023 (rustdoc: short descriptions cause word-breaks in tables)
 - rust-lang#128033 (Explain why we require `_` for empty patterns)

r? `@ghost`
`@rustbot` modify labels: rollup
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-aux failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@bors
Copy link
Contributor

bors commented Jul 21, 2024

💔 Test failed - checks-actions

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

@bors retry ?

@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 Jul 21, 2024
@workingjubilee
Copy link
Member

No, just the logfinder failing.
@bors r-


  error: Undefined Behavior: trying to retag from <46610762> for SharedReadWrite permission at alloc15134060[0x0], but that tag does not exist in the borrow stack for this location
  Error:    --> /checkout/library/core/src/ptr/non_null.rs:402:18
      |
  402 |         unsafe { &*self.as_ptr().cast_const() }
      |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      |                  |
      |                  trying to retag from <46610762> for SharedReadWrite permission at alloc15134060[0x0], but that tag does not exist in the borrow stack for this location
      |                  this error occurs as part of retag at alloc15134060[0x0..0x28]
      |
      = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental
      = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information
  help: <46610762> was created by a SharedReadWrite retag at offsets [0x0..0x21]
     --> /checkout/library/core/src/ptr/mod.rs:789:5
      |
  789 |     r
      |     ^
  help: <46610762> was later invalidated at offsets [0x8..0x10] by a write access
     --> library/std/src/sys/sync/rwlock/queue.rs:345:17
      |
  345 |                 node.prev = AtomicLink::new(None);
      |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      = note: BACKTRACE (of the first span) on thread `unnamed-776`:
      = note: inside `core::ptr::NonNull::<sys::sync::rwlock::queue::Node>::as_ref::<'_>` at /checkout/library/core/src/ptr/non_null.rs:402:18: 402:46
  note: inside `sys::sync::rwlock::queue::add_backlinks_and_find_tail`
     --> library/std/src/sys/sync/rwlock/queue.rs:255:34
      |
  255 |         let c = unsafe { current.as_ref() };
      |                                  ^^^^^^^^
  note: inside `sys::sync::rwlock::queue::RwLock::unlock_queue`
     --> library/std/src/sys/sync/rwlock/queue.rs:485:33
      |
  485 |             let tail = unsafe { add_backlinks_and_find_tail(to_node(state)) };
      |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  note: inside `sys::sync::rwlock::queue::RwLock::unlock_contended`
     --> library/std/src/sys/sync/rwlock/queue.rs:466:28
      |
  466 |                     return self.unlock_queue(next);
      |                            ^^^^^^^^^^^^^^^^^^^^^^^
  note: inside `sys::sync::rwlock::queue::RwLock::write_unlock`
     --> library/std/src/sys/sync/rwlock/queue.rs:450:22
      |
  450 |             unsafe { self.unlock_contended(state) }
      |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  note: inside `<sync::rwlock::RwLockWriteGuard<'_, ()> as core::ops::Drop>::drop`
     --> library/std/src/sync/rwlock.rs:727:13
      |
  727 |             self.lock.inner.write_unlock();
      |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  note: inside `core::ptr::drop_in_place::<sync::rwlock::RwLockWriteGuard<'_, ()>> - shim(Some(sync::rwlock::RwLockWriteGuard<'_, ()>))`
     --> /checkout/library/core/src/ptr/mod.rs:542:1
      |
  542 | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) {
      | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  note: inside `core::mem::drop::<sync::rwlock::RwLockWriteGuard<'_, ()>>`
     --> /checkout/library/core/src/mem/mod.rs:938:24
      |
  938 | pub fn drop<T>(_x: T) {}
      |                        ^
  note: inside closure
     --> library/std/src/sync/rwlock/tests.rs:37:21
      |
  37  |                     drop(r.write().unwrap());
      |                     ^^^^^^^^^^^^^^^^^^^^^^^^
  
  note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
  
  error: aborting due to 1 previous error
  
  error: test failed, to rerun pass `-p std --lib`

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 22, 2024
@workingjubilee
Copy link
Member

It is not at all clear why that would be erroring now, however, based on this rollup.

@workingjubilee
Copy link
Member

possibly #128038

@workingjubilee
Copy link
Member

( that or it's genuinely a flaky test due to a concurrency bug, in which case we really need to run down the bug. )

@joboet
Copy link
Member

joboet commented Jul 22, 2024

It's a known bug, see #121950.

@workingjubilee
Copy link
Member

Ugh.

@matthiaskrgr matthiaskrgr deleted the rollup-jpxahbo branch September 1, 2024 17:35
@jieyouxu jieyouxu added the CI-ABA-ptr-provenance-lockless-queue-fail CI spurious failure: related to #121950 label Nov 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc CI-ABA-ptr-provenance-lockless-queue-fail CI spurious failure: related to #121950 O-unix Operating system: Unix-like rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.