Page MenuHomeFreeBSD

tests/libc: Fix fortify_source uio tests
AcceptedPublic

Authored by markj on Thu, Jul 16, 8:36 PM.
Tags
None
Referenced Files
F163177687: D58289.diff
Mon, Jul 20, 6:43 PM
Unknown Object (File)
Sun, Jul 19, 8:28 PM
Unknown Object (File)
Sun, Jul 19, 1:18 PM
Unknown Object (File)
Sun, Jul 19, 10:59 AM
Unknown Object (File)
Sat, Jul 18, 5:16 PM
Unknown Object (File)
Thu, Jul 16, 9:00 PM
Subscribers

Details

Reviewers
kevans
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 74859
Build 71742: arc lint + arc unit