Skip to content

Pass zero as the TIOCSCTTY argument - #1717

Merged
sunfishcode merged 1 commit into
bytecodealliance:mainfrom
adityuhkapoor:fix/issue-1703
Oct 26, 2026
Merged

sunfishcode merged 1 commit into
bytecodealliance:mainfrom
adityuhkapoor:fix/issue-1703

Conversation

@adityuhkapoor

Copy link
Copy Markdown
Contributor

TIOCSCTTY takes an integer argument. Passing the address of zero supplies a
nonzero value instead. Pass a null pointer to encode zero and add a
regression test for the argument.

The regression test and isolated controlling-terminal tests pass with both
linux_raw and libc. strace confirms TIOCSCTTY receives zero. Both all-apis
suites retain two ARM prctl failures reproduced on the unpatched source.

Fixes #1703.

@sunfishcode
sunfishcode merged commit 815104f into bytecodealliance:main Oct 26, 2026
51 checks passed
@sunfishcode

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ioctl_tiocsctty passes the address of a zero instead of the documented 0 argument

2 participants