freebsd-skq/lib/libc/tests
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
..
c063 Add _test suffix to multiple tests in lib/libc to conform to the design noted 2015-11-02 01:29:01 +00:00
db Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
gen This seems like a very trivial bug that should have been squashed a long 2016-01-30 04:16:05 +00:00
hash Fix LDADD/DPADD that should be LIBADD. 2015-12-04 03:17:47 +00:00
inet Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
locale Change WARNS to 2 across the board with all the libc testcases 2015-11-15 05:21:58 +00:00
net Fix LDADD/DPADD that should be LIBADD. 2015-12-04 03:17:47 +00:00
nss Integrate tools/regression/lib/libc/nss into the FreeBSD test suite as 2015-12-16 08:09:03 +00:00
regex Fix LDADD/DPADD that should be LIBADD. 2015-12-04 03:17:47 +00:00
resolv Increase the timeout for resolv_test from the default (300 seconds) to 2015-12-23 18:48:32 +00:00
rpc Fix LDADD/DPADD that should be LIBADD. 2015-12-04 03:17:47 +00:00
setjmp Fix LDADD/DPADD that should be LIBADD. 2015-12-04 03:17:47 +00:00
ssp Fix regression in r291738: This really wants -lssp. 2015-12-05 18:56:21 +00:00
stdio Delete bogus freeing of uninitialized data 2015-12-08 04:51:21 +00:00
stdlib Let tsearch()/tdelete() use an AVL tree. 2015-12-22 18:12:11 +00:00
string Fix LDADD/DPADD that should be LIBADD. 2015-12-04 03:17:47 +00:00
sys Fix LDADD/DPADD that should be LIBADD. 2015-12-04 03:17:47 +00:00
termios Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
time Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
tls Fix LDADD/DPADD that should be LIBADD. 2015-12-04 03:17:47 +00:00
tls_dso Remove unused variable (SRCDIR) 2015-11-02 01:23:04 +00:00
ttyio Fix LDADD/DPADD that should be LIBADD. 2015-12-04 03:17:47 +00:00
Makefile Iterate down lib/libc/tests/nss... 2015-12-16 08:25:12 +00:00
Makefile.netbsd-tests Change WARNS to 2 across the board with all the libc testcases 2015-11-15 05:21:58 +00:00