| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
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
|
|
|
|
|
| |
Submitted by: Norman Hardy
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
conversions. Both the specification and the documentation say the
width is interpreted as the max number of wide characters to read, but
the implementation was interpreting it as the number of bytes to convert.
(See also r105317.)
This change has security implications for any applications that depend
on the buggy behavior, but the impact in practice is probably nil.
Any such application would already be buggy on other platforms that
get the semantics right. Also, these conversions are rarely used;
%ls, %lc, and %l[ are more appropriate.
|
|
|
|
|
|
|
| |
PR: docs/167201
Submitted by: Kurt Jaeger <fbsd-ports@opsec.eu>
Approved by: cperciva
MFC after: 3 days
|
|
|
|
|
|
|
|
|
| |
PR: bin/99800
Submitted by: Peter Jeremy <peterjeremy@optushome.com.au>
Reviewed by: jilles (code)
Reviewed by: dwhite (doc)
Approved by: cperciva
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reading wide characters manually. With this change, they now use
fgetwc(). To make this work, we use an internal version of fgetwc()
with a few extensions: it takes an mbstate * because non-wide streams
don't have a built-in mbstate, and it indicates the number of bytes
read.
vfscanf() now resembles vfwscanf() more closely. Minor functional
improvements include working xlocale support in vfscanf(), setting the
stream error indicator on encoding errors, and proper handling of
shift-based encodings. (Actually, making shift-based encodings work
with non-wide streams is hopeless, but the implementation now matches
the broken specification.)
|
|
|
|
|
| |
Submitted by: brueffer
Approved by: kib (mentor)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This tool changes the default buffering behaviour of standard
stdio streams.
It only works on dynamic binaries. To make it work for static
ones it would require cluttering stdio because there no single
entry point.
PR: 166660
Reviewed by: current@, jhb
Approved by: kib (mentor)
MFC after: 1 week
|
|
|
|
|
| |
Reported by: Matt Miller <matt matthewjmiller net>
MFC after: 1 week
|
|
|
|
|
|
|
| |
Konstantin Belousov.
MFC after: 1 week.
X-MFC with: r234715
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
| |
Submitted by: ru
Approved by: ru
MFC after: 3 days
X-MFC-With: r234700
|
|\
| |
| |
| |
| |
| | |
currently done by /etc/rc.d/jail.
MFC after: 3 months
|
| | |
|
| |\ |
|
| | |
| | |
| | |
| | | |
by /etc/rc.d/jail.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
PR: docs/164939
Submitted by: Niclas Zeising <zeising@daemonic.se>
Approved by: bcr
MFC after: 3 days
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
indicates the avaliability of FILE, to prevent possible reordering of
the writes as seen by other CPUs.
Reported by: Fengwei yin <yfw.bsd gmail com>
Reviewed by: jhb
MFC after: 1 week
|
| | |
| | |
| | |
| | | |
characters read.
|
| | | |
|
| | |
| | |
| | |
| | | |
sscanf("abc", "ab%ncd", &i) returns EOF, not 0.
|
| | |
| | |
| | |
| | |
| | |
| | | |
by separate conversion functions. This will hopefully make bugs more
noticeable (I noticed several already) and provide opportunities to
reduce code duplication.
|
| | |
| | |
| | |
| | | |
Reported by: das
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
prior to 3.0.0 release). This fixes several bugs related to memory
initialization.
Mangle __jemalloc_a0{malloc,calloc,free}() just like all the other
library-internal symbols in jemalloc, and adjust the tls allocation code
in libc to use the mangled names.
|
| | |
| | |
| | |
| | | |
- Follow the same macros used in device driver manual pages.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
loop bug introduced in r187302. This completes the fix.
PR: 167039
MFC after: 3 days
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
(i.e., the return value would overflow), set errno to EOVERFLOW
and return an error. This improves the chances that buggy
applications -- for instance, ones that pass in a negative integer
as the size due to a bogus calculation -- will fail in safe ways.
Returning an error in these situations is specified by POSIX, but
POSIX appears to have an off-by-one error that isn't duplicated in
this change.
Previously, some of these functions would silently cap the size at
INT_MAX+1, and others would exit with an error after writing more
than INT_MAX characters.
PR: 39256
MFC after: 2 weeks
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
true if the size is zero.
- Fix a claim that sprintf() is the same as snprintf() with an
infinite size. It's equivalent to snprintf() with a size of
INT_MAX + 1.
- Document the return values in the return values section.
- Document the possible errno value of EOVERFLOW.
MFC after: 2 weeks
|
| | |
| | |
| | |
| | | |
output string, even if an encoding error or malloc failure occurs.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
infinite loop pretty much unconditionally. It's remarkable that the
patch that introduced the bug was never tested, but even more
remarkable that nobody noticed for over two years.
PR: 167039
MFC after: 3 days
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
prior to 3.0.0 release) as contrib/jemalloc, and integrate it into libc.
The code being imported by this commit diverged from
lib/libc/stdlib/malloc.c in March 2010, which means that a portion of
the jemalloc 1.0.0 ChangeLog entries are relevant, as are the entries
for all subsequent releases.
|
| | |
| | |
| | |
| | |
| | |
| | | |
This ensures we follow the ABI by preserving registers r1-r3.
Reviewed by: jmallett, imp
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
struct is set to zero.
PR: bin/166483
Submitted by: Roy Marples <roy@marples.name>
Reviewed by: delphij
Approved by: cperciva
MFC after: 3 days
|
| | |
| | |
| | |
| | | |
Submitted by: bde
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
outside the range of valid file descriptors
PR: kern/164970
Submitted by: Peter Jeremy <peterjeremy@acm.org>
Reviewed by: jilles
Approved by: cperciva
MFC after: 1 week
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
usermode context switches (long jumps and ucontext operations). If these
are used across threads, multiple threads can end up with the same TLS base.
Madness will then result.
This makes behavior on PPC match that on x86 systems and on Linux.
MFC after: 10 days
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
privilege attempts to toggle SF_SETTABLE flags.
- Use the '^' operator in the SF_SNAPSHOT anti-toggling check.
Flags are now stored to ip->i_flags in one place after all checks.
Submitted by: bde
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
is already open in this process.
If the named semaphore is already open, sem_open() only increments a
reference count and did not take the flags into account (which otherwise
happens by passing them to open()). Add an extra check for O_CREAT|O_EXCL.
PR: kern/166706
Reviewed by: davidxu
MFC after: 10 days
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
currently generated code clobbers r3. Fix this by loading ARM_TP_ADDRESS
using inline assembly.
Approved by: imp (mentor)
|