All of lore.kernel.org
 help / color / mirror / Atom feed
* swab.3: mention UB when from and to overlap
@ 2025-10-11 22:18 Sertonix
  2025-10-11 22:40 ` Collin Funk
  0 siblings, 1 reply; 5+ messages in thread
From: Sertonix @ 2025-10-11 22:18 UTC (permalink / raw)
  To: Alejandro Colomar; +Cc: linux-man


The current swab.3 page doesn't seem to mention anything about what
happens when from and to overlap. In POSIX any overlap is UB.

glibc handles cases when from == to but it will choke when for example
from == to+1. I am uncertain if from == to is meant to be a feature.

If it is, would it be possible to mention that overlap is only safe when
from == to and it's glibc (not eg. musl)? If it's not intended would it
be possible to include the same information as in POSIX?

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-10-12 11:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-11 22:18 swab.3: mention UB when from and to overlap Sertonix
2025-10-11 22:40 ` Collin Funk
2025-10-12  0:02   ` Alejandro Colomar
2025-10-12 10:42     ` Sertonix
2025-10-12 11:04       ` Alejandro Colomar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.