Page MenuHomeFreeBSD

tests/libc: Fix fortify_source uio tests
ClosedPublic

Authored by markj on Jul 16 2026, 8:36 PM.
Tags
None
Referenced Files
F171863872: D58289.id183157.diff
Mon, Sep 14, 4:28 AM
F171863146: D58289.id182094.diff
Mon, Sep 14, 4:16 AM
Unknown Object (File)
Sat, Sep 12, 9:09 AM
Unknown Object (File)
Thu, Sep 3, 1:03 PM
Unknown Object (File)
Sun, Aug 30, 9:58 AM
Unknown Object (File)
Mon, Aug 17, 11:19 PM
Unknown Object (File)
Sun, Aug 16, 7:33 PM
Unknown Object (File)
Sun, Aug 16, 10:55 AM
Subscribers

Details

Summary

Some of the preadv() and readv() tests were not initializing the iovecs
they pass to the system call. When the system call is expected to fail,
that's fine since the FORTIFY_SOURCE checks cause the process to be
aborted. However, in the rest of the test cases, the (p)readv() call
could cause spurious test failures, e.g., when an uninitialized iov
entry points to the current stack frame and the canary gets overwritten.

Modify the tests to explicitly initialize iov entries to avoid this.
The "iov" variants don't have this problem, so leave them alone.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable