1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-27 11:55:06 +00:00
freebsd/lib/libc/tests/gen
Maxim Sobolev 7fd852f860 This seems like a very trivial bug that should have been squashed a long
time ago, but for some reason it was not. Basically, without this change
dlopen(3)'ing an empty .so file would just cause application to dump core
with SIGSEGV.

Make sure the file has enough data for at least the ELF header before
mmap'ing it.

Add a test case to check that dlopen an empty file return an error.

There were a separate discussion as to whether it should be SIGBUS
instead when you try to access region mapped from an empty file,
but it's definitely SIGSEGV now, so if anyone want to check that please
be my guest.
Reviewed by:	mjg, cem
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D5112
2016-01-30 04:16:05 +00:00
..
execve
posix_spawn
arc4random_test.c Fix some TAP -> ATF conversion errors 2015-11-09 06:16:38 +00:00
dlopen_empty_test.c This seems like a very trivial bug that should have been squashed a long 2016-01-30 04:16:05 +00:00
fmtcheck_test.c Integrate tools/regression/lib/libc/gen into the FreeBSD test suite 2015-11-09 06:24:11 +00:00
fmtmsg_test.c Integrate tools/regression/lib/libc/gen into the FreeBSD test suite 2015-11-09 06:24:11 +00:00
fnmatch_test.c Integrate tools/regression/lib/libc/gen into the FreeBSD test suite 2015-11-09 06:24:11 +00:00
fnmatch_testcases.h Fix -Wmissing-braces warnings by adding braces around all the 2015-11-15 05:13:33 +00:00
fpclassify2_test.c
ftw_test.c Fix -Wunused warnings 2015-11-15 05:02:41 +00:00
Makefile This seems like a very trivial bug that should have been squashed a long 2016-01-30 04:16:05 +00:00
popen_test.c Fix -Wunused warnings 2015-11-15 05:02:41 +00:00
posix_spawn_test.c Integrate tools/regression/lib/libc/gen into the FreeBSD test suite 2015-11-09 06:24:11 +00:00
test-fnmatch.c Add missing licensing boilerplate to test-fnmatch.c 2015-11-10 11:28:02 +00:00
wordexp_test.c Integrate tools/regression/lib/libc/gen into the FreeBSD test suite 2015-11-09 06:24:11 +00:00