[Clang] Use stable_sort in VerifyDiagnosticsConsumer. (#187827)
The new code introduced for `-verify-directives` in PR #179835 enforces
that the order of diagnostics matches the order of the directives.
However, before checking this, it sorts the directives by
SourceLocation. Perhaps non-obviously, all directives which appear
inside a single comment are given the same SourceLocation, pointing to
the beginning of the comment. While these are added in order they appear
in the comment, the non-stable std::sort may non-detministically
misorder them. Switching to stable_sort ensures the correct order is
verified.
This was observed as a random test failure on the checks in
clang/test/CXX/drs/cwg25xx.cpp lines 250 and 264, in some builds of
Clang. Note that those lines end in backslashes, and thus, despite
appearances, the directives on the following lines are also within the
same single comment.
release.sh: add chroot cleanup routine
The chroot_cleanup routine handles any cleanup needed post-chroot_setup,
etc. This consists of purely tearing down `${CHROOTDIR}/dev` today, but
might involve additional steps, as needed for custom functions. This
allows end-users to override the various chroot functions without having
to modify code in main() or replicate the unmount procedure in an
equivalent routine setup via the trap builtin.
This change modifies the /dev unmount process to use `umount -f` instead
of `umount`. The latter can result in failures if resources are still
mounted or are running post-build, whereas the former will clean up any
resources still in use by processes running in the chroot at time of
build. Moreover, the `chroot_cleanup` routine is now called when the
script is killed with `SIGINT` and `SIGTERM`, as well as at `EXIT`,
better ensuring that the script's resources are cleaned up in relatively common
scenarios that can be detected/handled.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55450 (as part of a larger change)
release.sh: document user-overriddable functions
This helps others attempting to customize the behavior of `release.sh`.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D55450 (as part of a larger change)
libc: Fix cxa_thread_atexit{,nothr} test.
After patch 9d26b82, we don't provide recursive call protection anymore.
Therefore, to pass the test, we adjust the testcase by protecting on
caller and the testcase is to make sure the dtors is properly handled.
Reported by: siva
Reviewed by: kib
Approved by: markj (mentor)
Fixes: 9d26b82826d9 ("libc: Fix dtor order in __cxa_thread_atexit")
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55893
hwpstate_amd: Refactor the cpufreq code by using delegation pattenr
We separate the code of CPPC and legacy pstate driver to make it easier
to read.
Reviewed by: olce
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55604
libcrypto: compile all PIC objects with -DOPENSSL_PIC -fPIC
This change modifies the libcrypto PIC objects to always compile with
`-DOPENSSL_PIC -fPIC` to restore parity with the upstream build process.
This ensures that the legacy provider is built with parity to the
upstream legacy provider.
MFC after: 12 days
Tested with: `make check` (legacy provider), `make universe`
Fixes: 14b9955e
Differential Revision: https://reviews.freebsd.org/D44896
nfs_clstate.c: Handle the same stateid case correctly
When an NFSv4.1/4.2 sarver upgrades a read delegation to
a write delegation, it does not need to change the
delegation's stateid.
Without this patch, a DELEGRETURN of the stateid was done
for the case where the delegation stateid had not changed.
This return was bogus, since the delegation stateid now
represents the new write delegation.
This patch fixes the priblem by checking for "same stateid"
and only doing the DELEGRETURN when it is not the same.
PR: 289711
(cherry picked from commit 016570c4463d5908953355ee1cf9a385ad9601b4)
nfs_clstate.c: Handle the same stateid case correctly
When an NFSv4.1/4.2 sarver upgrades a read delegation to
a write delegation, it does not need to change the
delegation's stateid.
Without this patch, a DELEGRETURN of the stateid was done
for the case where the delegation stateid had not changed.
This return was bogus, since the delegation stateid now
represents the new write delegation.
This patch fixes the priblem by checking for "same stateid"
and only doing the DELEGRETURN when it is not the same.
PR: 289711
(cherry picked from commit 016570c4463d5908953355ee1cf9a385ad9601b4)