Revert: Don't close stdin...
This have been observed by portupgrade in its interaction with file(1),
as reported as a regression in bin/209211.
PR: 209211
MFC after: 3 days
Interesting fixes:
3adaa2e Fix _Unwind_Exception cleanup functions
286776c Check exception cleanup function ptr before calling
edda626 Correct exception specifications on new and delete operators
This contains only bug fixes, no new features. The repository format is
also unchanged from 1.9.2. Full list of changes between 1.9.4 and
earlier versions:
https://svn.apache.org/repos/asf/subversion/tags/1.9.4/CHANGES
Note that the two security issues fixed in 1.9.4 (CVE-2016-2167 and
CVE-2016-2168) do not affect the version of Subversion in the FreeBSD
base system, since neither SASL nor Apache modules are enabled.
Relnotes: yes
MFC after: 2 weeks
Remove the semicolon accidentally added after the new conditional that tests
that /dev/zero is opened successfully.
MFC after: 1 week
X-MFC with: r298368
Pointhat to: ngie
Reported by: Coverity
CID: 1354980
Sponsored by: EMC / Isilon Storage Division
This will also now detect error conditions with
value->var.subs[sub - 1] == LEAF_ifPhysAddress where `string_get(..)`
could fail if iifp->physaddr and/or iifp->physaddrlen were deemed
invalid.
MFC after: 2 weeks
CID: 1006551
Reported by: Coverity, gcc
Sponsored by: EMC / Isilon Storage Division
- xalloc(..) ensures that e will be non-null via malloc + err.
- `e` is already dereferenced above, so logically it's impossible
to hit the lower test without crashing if it was indeed NULL.
MFC after: 3 days
CID: 1007408
Reported by: Coverity
Sponsored by: EMC / Isilon Storage Division
Pass dwarf-version to cc1as.
Fix PR26999 - crashing in cc1as with any '*bsd' target.
This should fix possible crashes when using -g in combination with
-save-temps.
Modify trapframe decoding to properly analyze trapframe.
Provide method for fixup_pc. It happens, that in some kernel
functions, the GDB stack frame decoder cannot determine both
func name and frame size. This is because these functions
either contain invalid instruction, or their format does
not match standard schema. Detect that scenarios and move
PC accordingly to jump into known function schema, which
GDB is able to parse.
Obtained from: Semihalf
Sponsored by: Juniper Networks
Reviewed by: kib, zbb
Differential Revision: https://reviews.freebsd.org/D5976
property. This should have been done a while back (certainly before
mergeing projects/release-pkg to head), but I fixed the merge conflicts
and forgot to correct the real problem afterward.
Noticed by: peter
Sponsored by: The FreeBSD Foundation
Fix a symbol table handling bug in elfcopy: elfcopy puts .symtab,
.strtab and .shstrtab sections in the end of the output object. If
the input objects have more sections after any of these 3 sections,
the section table will be reordered, and in that case the section
symbols should be regenerated for relocations.
The bug is triggered since newer clang puts .strtab section in the
beginning of the object produced.
Ticket: #525
Reported by: royger
Obtained from: ELF Tool Chain r3443
0.5.0:
document "trim" modifier
add xo_emit_field functions
Add xo_set_file{,_h} functions
Fix LIBXO_* variables; add -L and -I as needed
add --disable-silent-rules and an explicit make; s/PACKAGE-NAME/PACKAGE_NAME/; add /download/ to 'url'
fix silliness where xo_flush_h emitted closing tag (html); make the caller (xo_message) do it
flush after transitions; fix flush call in xo_do_emit
mkdir the version-specific packaging dir
use "XO_" instead of LIBXO_
0.6.0:
Add --with-retain-size to set the size (in bits) of the retain hash buckets
Add The Argument Modifier ({a:})
Add retain and no-retain to --libxo
autoconf: Add test for monitor.h
Document quote heuristic
go deep with nroff backslashes
Use "ULL" for 32 bit check
add xo_retain_clear and xo_retain_clear_all
docs: combine two 'handles' section; move command line argument section
handle GETTEXT when msgfmt isn't where it's supposed to be (FreeBSD)
make 'retain' a flag (XOEF_RETAIN) instead of a role; it's simpler, and doesn't feel as tacky. "{R:}" was painful to document, which means it's painful to use.
new xo_emit_f functions
nuke some unused UNUSEDs
test code: path must be static
update test cases
0.6.1:
fix version number (missed a commit during new-release)
Reviewed by: sjg
Approved by: sjg (mentor)
FreeBSD doesn't specifically list this as a supported error, and in some
configurations/versions of FreeBSD, this test will segfault as the memory
address might be evaluated in userspace, instead of in kernel space like
in NetBSD.
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
[libcxx] Enable noexcept for GCC 4.6 and greater
Summary:
This patch allows GCC 4.6 and above to use `noexcept` as opposed to
`throw()`.
Is it an ABI safe change to suddenly switch on `noexcept`? I imagine
it must be because it's disabled in w/ clang in C++03 but not C++11.
Reviewers: danalbert, jroelofs, mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D15516
This should fix errors from gcc 4.6 and higher when compiling llvm-cov
and/or other llvm tools.
Reported by: bdrewery
with libc++, which is also C++11. Also change one _Static_assert (which
is really C11) back into static_assert, like upstream.
This should help when compiling libcxxrt with newer versions of gcc,
which refuse to recognize any form of static assertions, if not
compiling for C++11 or higher.
While here, add -nostdinc++ to CFLAGS, to prevent picking up any C++
headers outside the source tree.
[X86] Emit a proper ADJCALLSTACKDOWN in EmitLoweredTLSAddr
We forgot to add the second machine operand to our ADJCALLSTACKDOWN,
resulting in crashes in PEI.
This fixes PR27071.
This should fix an assertion failure during buildworld, when using -Os,
and targeting either i386 directly, or building the 32-bit libraries on
amd64.
Reported by: Eric Camachat <eric.camachat@gmail.com>
Add <atomic> to ThreadPool.h, since std::atomic is used
Summary:
Apparently, when compiling with gcc 5.3.2 for powerpc64, the order of
headers is such that it gets an error about std::atomic<> use in
ThreadPool.h, since this header is not included explicitly. See also:
https://llvm.org/bugs/show_bug.cgi?id=27058
Fix this by including <atomic>. Patch by Bryan Drewery.
Reviewers: chandlerc, joker.eph
Subscribers: bdrewery, llvm-commits
Differential Revision: http://reviews.llvm.org/D18460
Merge ELF Tool Chain r3434:
Previously, elfcopy defines:
VMA: section virtual address
LMA: PHDR(p_vaddr)
While binutils(libbfd) defines:
VMA: section virtual address and PHDR(p_vaddr).
LMA: PHDR(p_paddr)
For elfcopy, p_paddr is considered not meaningful and is always set
to the same value as p_vaddr.
elfcopy was implemented that way because I thought p_paddr is not
used/meaningful according to the ELF ABI. However it turned out
p_paddr is at least used in some ELF files, e.g. the FreeBSD kernel.
This change made elfcopy treat p_paddr as LMA, same as libbfd.
(However, some VMA/LMA related command line option still need tweaking
to make them compatible with binutils objcopy. This will be improved
later)
Ticket: #524
And typo fixes in r3435 and r3436.
This fixes the Xen kernel build.
Submitted by: kaiw
Tested by: royger
Archive member handling works again
meta mode, treat missing reads as for writes.
Update dirdeps.mk - much improved startup time.
Update meta.stage.mk - avoid ln when chmod required.
struct tcpstat, because the structure can be zeroed out by netstat(1) -z,
and of course running connection counts shouldn't be touched.
Place running connection counts into separate array, and provide
separate read-only sysctl oid for it.
ftruncate/11, open/20, and truncate/11 copy sleep(1) to a temporary file on the
target filesystem, execute the binary, then expect a result. This doesn't work
with scenarios where the target binary cannot be executed, e.g. the filesystem
was mounted with -o noexec.
Ensure the filesystem hasn't been mounted with -o noexec for the testcases
before executing them.
Differential Revision: https://reviews.freebsd.org/D5622
MFC after: 1 week
Reviewed by: markj
Sponsored by: EMC / Isilon Storage Division
Fix GCC atomic implementation in C++03
Pull in r250802 from upstream libc++ trunk (by Eric Fiselier):
Detect relaxed constexpr rules for gcc versions
Pull in r255585 from upstream libc++ trunk (by Eric Fiselier):
Fix various GCC mis-configurations for newer versions.
This patch goes through and enables C++11 and C++14 features for newer GCC's.
The main changes are:
1. Turn on variable templates. (Uses __cpp_variable_templates)
2. Assert atomic<Tp> is trivially copyable (Uses _GNUC_VER >= 501).
3. Turn on trailing return support for GCC. (Uses _GNUC_VER >= 404)
4. XFAIL void_t test for GCC 5.1 and 5.2. Fixed in GCC 6.
Together, these should fix building clang 3.8.0 as part of building
world with recent versions of gcc (e.g. the devel/*-xtoolchain-gcc
ports).
Fix most GCC warnings during build. Only -Wattribute left.
This helps to fix a number of -Werror warnings when building world with
recent versions of gcc (e.g. the devel/*-xtoolchain-gcc ports).
The only relevant change here is the support for IPv6 in the config
file. The previous version of this supported IPv6 but not in the
config. The change for that ended up removing __sdp_sockaddr_to_sdp
which the IPV4 config code required; the IPv6 fix resolved the lack of
that symbol.
Note that the ChangeLog was lacking entries for which we already had the
changes for, which itself was an upstream bug.
Obtained from: https://www.openfabrics.org/downloads/libsdp/libsdp-1.1.108-0.17.ga6958ef.tar.gz
Sponsored by: EMC / Isilon Storage Division
An empty debug link target previously returned a confusing and incorrect
error like "objcopy: fread failed: No error: 0". Now, return an explicit
error.
GNU objcopy allows an empty file as the debug link target. However,
that case is nonsensical so diverging from GNU behaviour is fine.
Reviewed by: bdrewery
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5541
Add missing Symbol.map entry for __aligned_alloc.
Add weak-->strong symbol binding for
{malloc_stats_print,mallctl,mallctlnametomib,mallctlbymib} -->
{__malloc_stats_print,__mallctl,__mallctlnametomib,__mallctlbymib}. These
bindings complete the set necessary to allow applications to replace all
malloc-related symbols.
Update openresolve to version 3.7.3 including:
* Save the initial working directory and change to it just before
running any scripts.
This avoids scripts putting files accidently where they shouldn't.
* Strip trailing dot from search and domain names.
* man page improvements.
Relnotes: yes
After calling the cap_init(3) function Casper will fork from it's original
process, using pdfork(2). Forking from a process has a lot of advantages:
1. We have the same cwd as the original process.
2. The same uid, gid and groups.
3. The same MAC labels.
4. The same descriptor table.
5. The same routing table.
6. The same umask.
7. The same cpuset(1).
From now services are also in form of libraries.
We also removed libcapsicum at all and converts existing program using Casper
to new architecture.
Discussed with: pjd, jonathan, ed, drysdale@google.com, emaste
Partially reviewed by: drysdale@google.com, bdrewery
Approved by: pjd (mentor)
Differential Revision: https://reviews.freebsd.org/D4277
"invalid string offset 65521 >= 27261 for section `.strtab'". for object
files produced by recent versions of clang.
In BFD's elf_create_symbuf() function, the size of the symbol buffer
('ssymbuf') is not calculated correctly, and the initial value for the
'ssym' variable is off by one, since 'ssymbuf' has shndx_count + 1
members.
MFC after: 1 week
When the armv6 support was imported from a project branch, this complex
conditional logic and related #define'd values came along, but it's really
not clear what the intent of it all was. The effect, however, was that
OSABI was always set to zero, which is "UNIX System V ABI". Having the wrong
value there causes pkg(8) to avoid looking inside arm elf binaries to
determine shared-lib required/provides info for packaging.
If the output object is not an ELF file, choose an arbitrary ELF format
for the intermediate file. srec, ihex and binary formats are independent
of class, endianness and machine type so these choices do not affect the
output.
ELF Tool Chain ticket #517
Reviewed by: kai
Obtained from: ELF Tool Chain r3411
Some notable improvements include:
readelf:
- Add AArch64 relocation definitions.
- Report value of unknown relocation types.
elfcopy:
- Consider symbols with STB_GNU_UNIQUE binding as global symbols.
- Fixed support for VMA adjustment for loadable sections found
in relocatable objects.
- Handle nameless global symbols.
- Improve wildcard matching for !-prefixed symbols.
- Add PE/COFF support.
elfdump:
- Improve section type reporting.
- Add MIPS-specific section types.
This update also includes a significant number of bug fixes.
PR: 207091 [exp-run]
Sponsored by: The FreeBSD Foundation
the safe point to insert the prologue and epilogue of the function) on
X86. This prevents problems with some functions using TLS, such as in
jemalloc, and which was the cause for Address Sanitizer crashes. The
correct fix is still being discussed upstream.
This would have printed an unknown RISC-V relocation type as a SPARC
relocation.
CID: 1331398
Obtained from: ELF Tool Chain r3283
Sponsored by: The FreeBSD Foundation
as otherwise platforms with strict alignment would break. It's unclear
to me if there's also a problem with access to the address list following
the structure. However we never copied the address list after the structure
and thus are pointing at random memory. For now just use a pointer to the
original memory for accessing the address list making it at least work on
platforms with weak memory access.
PR: 195445
Reported by: wolfgang lyxys.ka.sub.org
Tested by: wolfgang lyxys.ka.sub.org (x86)
MFC after: 3 days
you over if you happen to use git for FreeBSD development, as it is
the case with the unbound/.gitignore, which lits files that are
actually required for the buildworld.
MFC after: 1 day
contrib/netbsd-tests/usr.bin/grep/t_grep.sh
Fix grep_test:recurse when /tmp is either zfs or tmpfs. The test was
relying on an implicit ordering of directory recursion which happens
to be true when using UFS. grep's specification requires no such
ordering. The solution is to ignore the order of grep's results.
Reviewed by: ngie
MFC after: 32 days
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D4925
mlock(2) fails
This helps identify the problem with running this test on my VM
hosts (ENOMEM)
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
Set vm.max_wired to INT_MAX in :mlock_err, :mlock_mmap, and :mlock_nested to
avoid hitting EAGAIN artificially on the system when running the tests
Require root privileges in order to set the sysctl
Add allow_sysctl_side_effects to require.config as this test is now adjusting
sysctls that can affect the global system state
Unlike the version submitted by cem in OneFS, this version uses a scratch file
to save/restore the previous value of the sysctl. I _really_, _really_ wish
there were better hooks in atf/kyua for per test suite setup/teardown -- using
a file is kludgy, but it's the best I can do to avoid situations where (for
instance), sysctl(3) may fail and drop a core outside the kyua sandbox.
Based on a patch submitted by cem, but modified to take business logic out of
ATF_TP_ADD_TCS(3).
Differential Revision: https://reviews.freebsd.org/D4779
MFC after: 1 month
Sponsored by: EMC / Isilon Storage Division
userspace iWARP library for cxgbe) to the list of libraries.
rping using the libcxgb4 + iw_cxgbe combo was tested with T5 hardware.
Obtained from: Chelsio Communications
This is required to build csu.
Reviewed by: andrew
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D5039
Fix PR26134: When substituting into default template arguments, keep
CurContext unchanged.
Or, do not set Sema's CurContext to the template declaration's when
substituting into default template arguments of said template
declaration.
If we do push the template declaration context on to Sema, and the
template declaration is at namespace scope, Sema can get confused and
try and do odr analysis when substituting into default template
arguments, even though the substitution could be occurring within a
dependent context.
I'm not sure why this was being done, perhaps there was concern that
if a default template argument referred to a previous template
parameter, it might not be found during substitution - but all
regression tests pass, and I can't craft a test that would cause it
to fails (if some one does, please inform me, and i'll craft a
different fix for the PR).
This patch removes a single line of code, but unfortunately adds more
than it removes, because of the tests. Some day I still hope to
commit a patch that removes far more lines than it adds, while
leaving clang better for it ;)
Sorry that r253590 ("Change the expression evaluation context from
Unevaluated to ConstantEvaluated while substituting into non-type
template argument defaults") caused the PR!
This fix will be merged to the upstream release_38 branch soon, but we
need it now, to fix a failure in the databases/sfcgal port.
Fix a wrong assertion in mandoc by applying OpenBSD
main.c,v 1.170 (florian):
Unbreak reading from stdin after recent parse() restructuring.
OK schwarze@
[DwarfDebug] Move MergeValues to .cpp, NFC
Pull in r257979 from upstream llvm trunk, by Keno Fischer:
[DwarfDebug] Don't merge DebugLocEntries if their pieces overlap
Summary:
Later in DWARF emission we check that DebugLocEntries have
non-overlapping pieces, so we should create any such entries
by merging here.
Fixes PR26163.
Reviewers: aprantl
Differential Revision: http://reviews.llvm.org/D16249
Again, these will be merged to the official release_38 branch soon, but
we need them ASAP.
be merged to the official release_38 branch soon, but we need it ASAP):
Stop increasing alignment of externally-visible globals on ELF
platforms.
With ELF, the alignment of a global variable in a shared library will
get copied into an executables linked against it, if the executable even
accesss the variable. So, it's not possible to implicitly increase
alignment based on access patterns, or you'll break existing binaries.
This happened to affect libc++'s std::cout symbol, for example. See
thread: http://thread.gmane.org/gmane.comp.compilers.clang.devel/45311
(This is a re-commit of r257719, without the bug reported in
PR26144. I've tweaked the code to not assert-fail in
enforceKnownAlignment when computeKnownBits doesn't recurse far enough
to find the underlying Alloca/GlobalObject value.)
Differential Revision: http://reviews.llvm.org/D16145
was not recognized anymore for arm targets. Fix this by adding the
correct sub-arch to the xscale definition in ARMTargetParser.def. This
fix (from Andrew Turner) has also been submitted upstream.
Submitted by: Jun Su <junsu microsoft com>
Reviewed by: Dexuan Cui <decui microsoft com>, me, adrain
Approved by: adrian
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D4762