Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions library/core/src/ascii/ascii_char.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1049,8 +1049,8 @@ impl AsciiChar {
/// before using this function.
///
/// [infra-aw]: https://infra.spec.whatwg.org/#ascii-whitespace
/// [pct]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_01
/// [bfs]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_05
/// [pct]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap07.html#tag_07_03_01
/// [bfs]: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap02.html#tag_19_06_05
///
/// # Examples
///
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/char/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2354,8 +2354,8 @@ impl char {
/// before using this function.
///
/// [infra-aw]: https://infra.spec.whatwg.org/#ascii-whitespace
/// [pct]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_01
/// [bfs]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_05
/// [pct]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap07.html#tag_07_03_01
/// [bfs]: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap02.html#tag_19_06_05
///
/// # Examples
///
Expand Down
4 changes: 2 additions & 2 deletions library/core/src/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1125,8 +1125,8 @@ impl u8 {
/// before using this function.
///
/// [infra-aw]: https://infra.spec.whatwg.org/#ascii-whitespace
/// [pct]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html#tag_07_03_01
/// [bfs]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_05
/// [pct]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap07.html#tag_07_03_01
/// [bfs]: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap02.html#tag_19_06_05
///
/// # Examples
///
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/os/fd/owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ impl Drop for OwnedFd {
unsafe {
// Note that errors are ignored when closing a file descriptor. According to POSIX 2024,
// we can and indeed should retry `close` on `EINTR`
// (https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/functions/close.html),
// (https://pubs.opengroup.org/onlinepubs/9799919799/functions/close.html),
// but it is not clear yet how well widely-used implementations are conforming with this
// mandate since older versions of POSIX left the state of the FD after an `EINTR`
// unspecified. Ignoring errors is "fine" because some of the major Unices (in
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/os/unix/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub impl(self) trait CommandExt {
/// locations might not appear where intended.
///
/// [POSIX fork() specification]:
/// https://pubs.opengroup.org/onlinepubs/9699919799/functions/fork.html
/// https://pubs.opengroup.org/onlinepubs/9799919799/functions/fork.html
/// [`std::env`]: mod@crate::env
/// [`Error::new`]: crate::io::Error::new
/// [`Error::other`]: crate::io::Error::other
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4137,7 +4137,7 @@ impl Error for NormalizeError {}
/// Note that this [may change in the future][changes].
///
/// [changes]: io#platform-specific-behavior
/// [posix-semantics]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13
/// [posix-semantics]: https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap04.html#tag_04_16
/// [windows-path]: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getfullpathnamew
/// [cygwin-path]: https://cygwin.com/cygwin-api/func-cygwin-conv-path.html
#[stable(feature = "absolute_path", since = "1.79.0")]
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/fs/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1902,7 +1902,7 @@ impl fmt::Debug for File {
// Format in octal, followed by the mode format used in `ls -l`.
//
// References:
// https://pubs.opengroup.org/onlinepubs/009696899/utilities/ls.html
// https://pubs.opengroup.org/onlinepubs/9799919799/utilities/ls.html
// https://www.gnu.org/software/libc/manual/html_node/Testing-File-Type.html
// https://www.gnu.org/software/libc/manual/html_node/Permission-Bits.html
//
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/unix/conf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub fn page_size() -> usize {
/// `_CS_PATH` or `_CS_V[67]_ENV` in the future).
///
/// [posix_confstr]:
/// https://pubs.opengroup.org/onlinepubs/9699919799/functions/confstr.html
/// https://pubs.opengroup.org/onlinepubs/9799919799/functions/confstr.html
#[cfg(target_vendor = "apple")]
pub fn confstr(
key: crate::ffi::c_int,
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/unix/sync/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ impl Mutex {
// A pthread mutex initialized with PTHREAD_MUTEX_INITIALIZER will have
// a type of PTHREAD_MUTEX_DEFAULT, which has undefined behavior if you
// try to re-lock it from the same thread when you already hold a lock
// (https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_init.html).
// (https://pubs.opengroup.org/onlinepubs/9799919799/functions/pthread_mutex_init.html).
// This is the case even if PTHREAD_MUTEX_DEFAULT == PTHREAD_MUTEX_NORMAL
// (https://github.com/rust-lang/rust/issues/33770#issuecomment-220847521) -- in that
// case, `pthread_mutexattr_settype(PTHREAD_MUTEX_DEFAULT)` will of course be the same
Expand Down
4 changes: 2 additions & 2 deletions library/std/src/sys/path/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ pub const HAS_PREFIXES: bool = false;
pub(crate) fn absolute(path: &Path) -> io::Result<PathBuf> {
// This is mostly a wrapper around collecting `Path::components`, with
// exceptions made where this conflicts with the POSIX specification.
// See 4.13 Pathname Resolution, IEEE Std 1003.1-2017
// https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13
// See 4.16 Pathname Resolution, IEEE Std 1003.1-2024
// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap04.html#tag_04_16

// Get the components, skipping the redundant leading "." component if it exists.
let mut components = path.strip_prefix(".").unwrap_or(path).components();
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/process/unix/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ impl ExitStatus {
pub fn exit_ok(&self) -> Result<(), ExitStatusError> {
// This assumes that WIFEXITED(status) && WEXITSTATUS==0 corresponds to status==0. This is
// true on all actual versions of Unix, is widely assumed, and is specified in SuS
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html. If it is not
// https://pubs.opengroup.org/onlinepubs/9799919799/functions/wait.html. If it is not
// true for a platform pretending to be Unix, the tests (our doctests, and also
// unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too.
match NonZero::try_from(self.0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl ExitStatus {
pub fn exit_ok(&self) -> Result<(), ExitStatusError> {
// This assumes that WIFEXITED(status) && WEXITSTATUS==0 corresponds to status==0. This is
// true on all actual versions of Unix, is widely assumed, and is specified in SuS
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html. If it is not
// https://pubs.opengroup.org/onlinepubs/9799919799/functions/wait.html. If it is not
// true for a platform pretending to be Unix, the tests (our doctests, and also
// unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too.
match NonZero::try_from(self.wait_status) {
Expand Down
2 changes: 1 addition & 1 deletion library/std/src/sys/process/unix/vxworks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ impl ExitStatus {
pub fn exit_ok(&self) -> Result<(), ExitStatusError> {
// This assumes that WIFEXITED(status) && WEXITSTATUS==0 corresponds to status==0. This is
// true on all actual versions of Unix, is widely assumed, and is specified in SuS
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/wait.html. If it is not
// https://pubs.opengroup.org/onlinepubs/9799919799/functions/wait.html. If it is not
// true for a platform pretending to be Unix, the tests (our doctests, and also
// unix/tests.rs) will spot it. `ExitStatusError::code` assumes this too.
match NonZero::try_from(self.0) {
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/src/concurrency/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ trait EvalContextPrivExt<'tcx>: MiriInterpCxExt<'tcx> {
// "in the past" fire before any other thread can take an action. This ensures that for
// `pthread_cond_timedwait`, "an error is returned if [...] the absolute time specified by
// abstime has already been passed at the time of the call".
// <https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_cond_timedwait.html>
// <https://pubs.opengroup.org/onlinepubs/9799919799/functions/pthread_cond_timedwait.html>

@RalfJung RalfJung Jun 27, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this risk causing a dangling reference since whatever quote or behavior the text was referring to might have gotten changed in the latest version?

View changes since the review

let potential_sleep_time = this.unblock_expired_deadlines()?;

let thread_manager = &mut this.machine.threads;
Expand Down
2 changes: 1 addition & 1 deletion src/tools/miri/src/shims/unix/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
// * Maximum number of times an application can call `tmpnam()` reliably.
// * The value of `TMP_MAX` is at least 25.
// * On XSI-conformant systems, the value of `TMP_MAX` is at least 10000.
// See <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdio.h.html>.
// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/stdio.h.html>.
let max_attempts = this.eval_libc_u32("TMP_MAX");

// Get the raw bytes from the template -- as a byte slice, this is a string in the target
Expand Down
6 changes: 3 additions & 3 deletions src/tools/miri/src/shims/unix/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
} else {
// The mutex was locked by another thread or not locked at all. See
// the “Unlock When Not Owner” column in
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_mutex_unlock.html.
// https://pubs.opengroup.org/onlinepubs/9799919799/functions/pthread_mutex_unlock.html.
match mutex.kind {
MutexKind::Default =>
throw_ub_format!(
Expand Down Expand Up @@ -702,7 +702,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
// thread in any way.
//
// Relevant documentation:
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_wrlock.html
// https://pubs.opengroup.org/onlinepubs/9799919799/functions/pthread_rwlock_wrlock.html
// An in-depth discussion on this topic:
// https://github.com/rust-lang/rust/issues/53127
//
Expand Down Expand Up @@ -777,7 +777,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
if this.tcx.sess.target.os != Os::MacOs {
// The default value of the clock attribute shall refer to the system
// clock.
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_condattr_setclock.html
// https://pubs.opengroup.org/onlinepubs/9799919799/functions/pthread_condattr_setclock.html
let default_clock_id = this.eval_libc_i32("CLOCK_REALTIME");
condattr_set_clock_id(this, attr_op, default_clock_id)?;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/process/process-spawn-failure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fn find_zombies() {
extern crate libc;
let my_pid = unsafe { libc::getpid() };

// https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ps.html
// https://pubs.opengroup.org/onlinepubs/9799919799/utilities/ps.html
let ps_cmd_output = Command::new("ps").args(&["-A", "-o", "pid,ppid,args"]).output().unwrap();
let ps_output = String::from_utf8_lossy(&ps_cmd_output.stdout);
// On AIX, the PPID is not always present, such as when a process is blocked
Expand Down
Loading