freebsd-skq/lib/libc
dumbbell 06fcd8e365 Remove incorrect __restrict qualifier on several pointers
The typical case was:
static __inline int
convert_ccl(FILE *fp, char * __restrict p, [...])
{
        [...]

        if (p == SUPPRESS_PTR) {
		[...]
	} else {
		[...]
	}

	[...]
}

This qualifier says that the pointer is the only one at that time
pointing to the resource.

Here, clang considers that "p" will never match "SUPPRESS_PTR" and
optimize the if{} block out. This leads to segfaults in programs calling
vfscanf(3) and vfwscanf(3) with just the format string (no arguments
following it).

The following softwares were reported to abort with segmentation fault
and this patch fixes it:
    o  cmake
    o  smartd
    o  devel/ORBit2

dim@ opened an LLVM PR to discuss this clang optimization:
    http://llvm.org/bugs/show_bug.cgi?id=12656

Tested by:	bsam@
2012-04-30 11:28:17 +00:00
..
amd64 Make the sys/ucontext.h self-contained by changing the return type 2012-02-01 13:33:53 +00:00
arm Replace the C implementation of __aeabi_read_tp with an assembly version. 2012-04-16 09:38:20 +00:00
compat-43 Remove non-existing error condition. 2012-03-15 21:19:50 +00:00
db Globally replace u_int*_t from (non-contributed) man pages. 2012-02-12 18:29:56 +00:00
gdtoa Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
gen Use the .Bx macro instead of BSD 2012-04-26 19:21:58 +00:00
gmon Allow users of gprof to get per run output files (using the pid) 2012-04-29 22:19:58 +00:00
i386 mdoc: sort prologue macros. 2012-03-26 19:23:57 +00:00
ia64 Make the sys/ucontext.h self-contained by changing the return type 2012-02-01 13:33:53 +00:00
iconv Fix Fo arguments. 2012-03-28 19:20:28 +00:00
include Take the spinlock around clearing of the fp->_flags in fclose(3), which 2012-04-24 17:51:36 +00:00
inet A new jail(8) with a configuration file, to replace the work currently done 2010-10-19 21:32:13 +00:00
isc A new jail(8) with a configuration file, to replace the work currently done 2010-10-19 21:32:13 +00:00
locale Fix some incorrect symbol versions. 2012-04-22 18:51:38 +00:00
mips Implement _set_tp 2012-03-06 03:30:09 +00:00
nameser A new jail(8) with a configuration file, to replace the work currently done 2010-10-19 21:32:13 +00:00
net Move sctp_sendv and sctp_recvv to FBSD_1.3 as suggested by 2012-04-26 19:56:06 +00:00
nls A new jail(8) with a configuration file, to replace the work currently done 2010-10-19 21:32:13 +00:00
posix1e mandoc complains loudly when <TAB>s are misused in columnated lists. Fix 2012-03-29 16:02:40 +00:00
powerpc Do not restore the register holding the TLS pointer when doing various 2012-04-11 00:00:40 +00:00
powerpc64 Do not restore the register holding the TLS pointer when doing various 2012-04-11 00:00:40 +00:00
quad A new jail(8) with a configuration file, to replace the work currently done 2010-10-19 21:32:13 +00:00
regex Remove some duplicated copyright notices. 2012-03-06 12:53:44 +00:00
resolv Remove meaningless self-assignment in res_send.c, otherwise clang will 2011-12-15 20:10:12 +00:00
rpc Fix several memory and lock leaks on the out of memory condition. 2012-04-28 18:57:27 +00:00
softfloat Conditionalize the __floatunsisf and __floatunsidf functions, added in 2012-01-20 14:44:21 +00:00
sparc64 Make the sys/ucontext.h self-contained by changing the return type 2012-02-01 13:33:53 +00:00
stdio Remove incorrect __restrict qualifier on several pointers 2012-04-30 11:28:17 +00:00
stdlib Import jemalloc 9ef7f5dc34ff02f50d401e41c8d9a4a928e7c2aa (dev branch, 2012-04-17 07:22:14 +00:00
stdtime Implement xlocale APIs from Darwin, mainly for use by libc++. This adds a 2011-11-20 14:45:42 +00:00
string Remove trailing whitespace per mdoc lint warning 2012-03-29 05:02:12 +00:00
sys fix a further typo in the pdfork(2) man page. 2012-04-30 08:00:52 +00:00
uuid Note that memory should be freed after uuid_to_string(3) call. 2012-03-01 14:39:01 +00:00
xdr Add a HISTORY section 2011-07-10 06:57:00 +00:00
yp Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessor 2012-02-07 09:27:07 +00:00
Makefile Import jemalloc 9ef7f5dc34ff02f50d401e41c8d9a4a928e7c2aa (dev branch, 2012-04-17 07:22:14 +00:00
Versions.def Add a FBSD_1.3 namespace for FreeBSD 10. 2011-10-10 15:42:33 +00:00