Page MenuHomeFreeBSD

tests/libc: Fix fortify_source uio tests
ClosedPublic

Authored by markj on Thu, Jul 16, 8:36 PM.
Tags
None
Referenced Files
F164357926: D58289.diff
Fri, Jul 31, 3:53 AM
Unknown Object (File)
Thu, Jul 30, 11:13 AM
Unknown Object (File)
Mon, Jul 27, 8:51 AM
Unknown Object (File)
Sat, Jul 25, 8:04 PM
Unknown Object (File)
Fri, Jul 24, 8:48 AM
Unknown Object (File)
Thu, Jul 23, 9:05 PM
Unknown Object (File)
Thu, Jul 23, 1:19 AM
Unknown Object (File)
Wed, Jul 22, 8:23 PM
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 Skipped
Unit
Tests Skipped
Build Status
Buildable 74859
Build 71742: arc lint + arc unit