Fallback F_DUPFD_CLOEXEC to non-atomic ops on AIX on EINVAL#159953
Fallback F_DUPFD_CLOEXEC to non-atomic ops on AIX on EINVAL#159953pgimalac wants to merge 1 commit into
Conversation
Signed-off-by: Pierre Gimalac <23154723+pgimalac@users.noreply.github.com>
|
"Some AIX 7.2 versions" -- can you be more specific? Are we missing capturing some version information in the platform support documentation? |
|
@Mark-Simulacrum all I can say for now is that AIX 7.2 TL2 doesn't have it but AIX 7.3 TL2 has it. That's why the PR is still a draft, I wanted to find the TL ("technology level", basically a minor version) which adds support for |
Is this even relevant? The first AIX release where Rust is supported in toolbox is 7.2 TL5. That may not be the baseline that Rust is targeting, but I would say it's unreasonable to try to support a lower baseline than what IBM supports. In my 7.2 TL5 install, |
Some AIX 7.2 versions don't support
F_DUPFD_CLOEXEC, andfcntlreturnsEINVALin that case, similarly to older Linux kernels.This makes
tokiofail to initialize on those versions:Failed building the Runtime: Os { code: 22, EINVAL }.This PR implements a fallback to non-atomically do
F_DUPFDthen setFD_CLOEXECwhenEINVALis returned on AIX.A similar mechanism used to exist for Linux (removed by #74606).