| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clock_gettime(2) functions if supported. The speedup seen in
microbenchmarks is in range 4x-7x depending on the hardware.
Only amd64 and i386 architectures are supported. Libc uses rdtsc and
kernel data to calculate current time, if enabled by kernel.
Hopefully, this code is going to migrate into vdso in some future.
Discussed with: bde
Reviewed by: jhb
Tested by: flo
MFC after: 1 month
|
|
|
|
|
|
|
|
| |
relevant Makefile.
Reminded by: gavin
Approved by: gabor (mentor)
MFC after: 5 days
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- libc/string/strcoll.3
- libc/string/strstr.3
- libc/string/strxfrm.3
- libc/string/strcasecmp.3
Reviewed by: theraven, gabor
Approved by: gabor (mentor)
MFC after: 5 days
|
|
|
|
|
|
|
|
|
|
| |
Add a sanity check for the validity of the passed fd.
PR: kern/139080 [1]
Submitted by: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua> [1]
Reviewed by: pjd (briefly)
Approved by: cperciva
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
First, extend the changes in r230782 to better handle the common case
of using NOREUSE with sequential reads. A NOREUSE file descriptor
will now track the last implicit DONTNEED request it made as a result
of a NOREUSE read. If a subsequent NOREUSE read is adjacent to the
previous range, it will apply the DONTNEED request to the entire range
of both the previous read and the current read. The effect is that
each read of a file accessed sequentially will apply the DONTNEED
request to the entire range that has been read. This allows NOREUSE
to properly handle misaligned reads by flushing each buffer to cache
once it has been completely read.
Second, apply the same changes made to read(2) by r230782 and this
change to writes. This provides much better performance in the
sequential write case as it allows writes to still be clustered. It
also provides much better performance for misaligned writes. It does
mean that NOREUSE will be generally ineffective for non-sequential
writes as the current implementation relies on a future NOREUSE
write's implicit DONTNEED request to flush the dirty buffer from the
current write.
MFC after: 2 weeks
|
| |
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
string buffer for each linelist l_line into one large string. Since
linelists parsed out during the previous passes store the pointers to
previously allocated l_lines, the reallocation caused undefined
behaviour on accessing the buffers, and quite deterministic fault on
freeing them (in mountd(8) startup).
This fixes reading of netgroup(5) file which contains more then one
netgroup.
Discussed with: ghelmer
MFC after: 3 days
|
|
|
|
| |
Obtained from: OpenBSD
|
|
|
|
|
|
| |
belongs in FBSD_1.3.
MFC after: 1 week
|
|
|
|
|
|
| |
PR: kern/169023
Submitted by: Jukka Ukkonen <jau iki fi>
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
| |
so include it in the public namespace on arm just as with
other architectures.
This corrects r236816.
Submitted by: Jan Sieka
MFC after: 1 week
|
|
|
|
|
|
| |
No functional change.
Obtained from: NetBSD via OpenBSD
|
|
|
|
| |
Reported by: mm
|
|
|
|
|
|
| |
Submitted by: Jan Sieka
Reviewed by: arm@
MFC after: 1 week
|
|
|
|
|
|
|
| |
trigger with clang, when you either use -save-temps, or ccache.
Reported by: Sevan / Venture37 <venture37@gmail.com>
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
http://austingroupbugs.net/view.php?id=385#c713
(Resolved state) recommend this way for the current standard (called
"earlier" in the text)
"However, earlier versions of this standard did not require this, and the
same example had to be written as:
// buf was obtained by malloc(buflen)
ret = write(fd, buf, buflen);
if (ret < 0) {
int save = errno;
free(buf);
errno = save;
return ret;
}
"
from feedback I have for previous commit it seems that many people prefer
to avoid mass code change needed for current standard compliance
and prefer to track unpublished standard instead, which requires now
that free() itself must save errno, not its usage code.
So, I back out "save errno across free()" part of previous commit,
and will fill PR for changing free() isntead.
2) Remove now unused serrno.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"The setting of errno after a successful call to a function is
unspecified unless the description of that function specifies that
errno shall not be modified."
However, free() in IEEE Std 1003.1-2008 does not mention its interaction
with errno, so MAY modify it after successful call
(it depends on particular free() implementation, OS-specific, etc.).
So, save errno across free() calls to make code portable and
POSIX-conformant.
2) Remove unused serrno assignment.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
| |
The stat structures returned on pipes seems to contain all the
information required by POSIX. Especially the wording "and thus to a
pipe" makes little sense, because it seems to imply a certain
relationship between sockets and pipes that simply isn't there.
MFC after: 2 weeks
|
| |
|
|
|
|
|
|
|
| |
of local variable declarations, remove bogus casts, and resolve long
lines.
Reviewed by: bde
|
|
|
|
|
|
|
|
|
|
| |
this fflush may fail to write data in the buffer.
PR: kern/137819
Submitted by: Eric Blake <ebb9@byu.net>
Reviewed by: theraven
Approved by: cperciva
MFC after: 2 weeks
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
| |
current one (= FBSD_1.3).
Pointed out by: kib
|
|
|
|
|
|
|
| |
function. The purpose of the __eabi() function is to set up the
runtime and is called first thing by main(). The runtime is already
set up for us prior to caling main, so there's nothing to do for
us in the EABI case.
|
|
|
|
|
|
|
|
|
| |
- libc/stdio/scanf_l.3
- libc/stdio/printf_l.3
Reviewed by: theraven
Approved by: gabor (mentor)
MFC after: 5 days
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
| |
Reported by: tinderbox
|
|
|
|
|
|
|
|
| |
avoid creating bad entries in the grp list as a result of memory allocation
failures while building new entries.
PR: bin/83340
Reviewed by: delphij (prior version of patch)
|
|
|
|
| |
Reviewed by: delphij (prior version of the patch)
|
|
|
|
| |
Functions affected: strerror, strsignal, gai_strerror.
|
|
|
|
| |
Note that this still misses a proper dependency at this time.
|
|
|
|
| |
Requested by: kib@
|
|
|
|
|
|
|
|
|
|
| |
Introduce dirfd() libc exported symbol replacing macro with same name,
preserve _dirfd() macro for internal use.
Replace dirp->dd_fd with dirfd() call. Avoid using dirfd as variable
name to prevent shadowing global symbol.
Sponsored by: Google Summer Of Code 2011
|
|
|
|
|
|
|
| |
it possible to work with a different type for the sdl_index field --
it only requires a recompile.
Obtained from: Juniper Networks, Inc.
|
| |
|
| |
|
| |
|
|
|
|
| |
of our manual pages.
|
| |
|
|
|
|
|
|
| |
PR: 167734
Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org)
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ENOENT] A component of file_name does not name an existing file or
file_name points to an empty string.
[ENOTDIR] A component of the path prefix is not a directory, or the
file_name argument contains at least one non- <slash> character
and ends with one or more trailing <slash> characters and the last
pathname component names an existing file that is neither a
directory nor a symbolic link to a directory.
Add checks for the listed conditions, and set errno accordingly.
Update the realpath(3) manpage to mention SUS behaviour. Remove the
requirement to include sys/param.h before stdlib.h.
PR: 128933
MFC after: 3 weeks
|
|
|
|
| |
Submitted by: Kohji Okuno <okuno.kohji@jp.panasonic.com>
|
|
|
|
|
| |
Approved by: cperciva
MFC after: 3 days
|
|
|
|
|
| |
Submitted by: Greg Bednarek <gbednarek averesystems com>
MFC after: 1 week
|
|
|
|
|
| |
PR: 167713
Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org)
|
|
|
|
| |
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
|
| |
Submitted by: Norman Hardy
MFC after: 3 days
|