Repository navigation
Open
Labels
upstreamA defect of upstream ibcs-us corrected here by patches/; not reported upstream yet
Description
This issue is the record of the defects found in upstream ibcs-us 4.3 (ibcs-us-4.3.tar.gz, sha256 c49da199…10522464) and corrected in this repository by patches/ibcs-us-4.3-corrections.patch. None has been reported upstream. Upstream accepts defect reports that come with a patch; the patch exists, and whether and when to send it is the maintainers' decision. Until then this issue is the list to send from.
Defects (release 4.3-1)
| # | File | Defect | Seen as | Correction |
|---|---|---|---|---|
| 1 | binfmt-elf/binfmt_elf.c (elf_map) |
The file's mapping is extended over the zero-filled part of a segment | SIGBUS in an executable whose file ends before that part (one with no debugging information after its data) | Anonymous pages for the part beyond the file |
| 2 | per-svr4/open.c (svr4_getdents) |
Entries are written in the build host's struct dirent |
Names read nine bytes late | The interface's layout (long d_ino; long d_off; unsigned short d_reclen; char d_name[]), stated in the file |
| 3 | ibcs/linux26-compat.c (file_operations_llseek) |
A 64-bit offset is handed to lseek as words; its upper half is read as the origin |
A query of the position sets it to zero; a directory is listed from its start at every call | _llseek |
| 4 | ibcs/linux26-compat.c (vfs_readdir) |
A batch of host entries is read and only its first handed over | A directory of one entry | Every entry; an entry with no room is read again by the next call |
| 5 | ibcs/linux26-compat.c (vfs_readdir) |
A full caller buffer is returned as a failure of the reading | Under per_uw7 and per_solaris, a directory larger than the caller's buffer is an error |
Zero, as the kernel's vfs_readdir answers |
| 6 | ibcs/linux26-compat.c (system-call table) |
chmod and chown are entered as the stat and access handlers |
chmod of any file answers EFAULT |
The handler for a path |
| 7 | per-svr4/fcntl.c (F_FREESP) |
Answers success and frees nothing | A shortened file keeps its length | A truncation, for a range that reaches the end of the file |
tests/run.sh shows each of them under per_uw7, per_solaris and per_osr5; the upstream's released binary ends at the first.
Observations that are not corrected here
| Observation | Note |
|---|---|
At the source's -O2, GCC 16 produces a loader that fails in open |
Built at -O1 here; the cause in the source (or the compiler) is not established |
The source defines bool, so it does not compile as C23 |
Built with -std=gnu17 |
exec is handed to Linux's execve: the new image is started as a Linux program and leaves the emulation |
Upstream behaviour by design; it is why a program run here cannot start another program of the interface without a host-wide binfmt_misc rule |
sysi86(SI86DSCR) answers EINVAL |
A program cannot set up a segment for a thread pointer |
No execution domain of System V Release 4.0 itself is registered (-p per_svr4 ends with exec_domain not set) |
The interfaces available are its descendants' (UnixWare 7, Solaris, OpenServer 5) and others |
After fork both programs have a zero second result; the child is known by a zero first result |
The system's own convention is a non-zero second result in the child |
A defect found later is added to this issue and to patches/, and the release number rises (4.3-<n>).
Metadata
Metadata
Assignees
Labels
upstreamA defect of upstream ibcs-us corrected here by patches/; not reported upstream yet
Activity
Sunrisepeak commentedon Nov 19, 2026
4.3-2 (#3) adds a change of behaviour, kept apart from the corrections (
patches/ibcs-us-4.3-exec.patch), and like them not reported upstream:abi_exec(per-svr4/misc.c) handsexecto Linux, which starts the file as its own program outside the emulation, where its first call through the call gate faults. From 4.3-2 an exec of an i386 COFF or x.out executable, or of an i386 ELF that does not name Linux's dynamic linker, starts/proc/self/exeagain with the run's options (-p, -t, -l, -m) and the new--exec=F(load F, pass the arguments on unchanged, argv[0] included); any other file is Linux's, as before. Probe: under 4.3-1 'a program exec starts runs in the emulation' is NOT HELD (SIGSEGV), under 4.3-2 it holds under per_uw7, per_solaris and per_osr5. One trap found on the way:ibcs_syscallis declaredlong longand only its low word is the result, so results are taken asint. Used by openkal-svr4 0.3.0 (openkal.process under the emulation).