[KnownFPClass] Improve known class deductions for exp/exp2/exp10 (#217526)
Loosens the requirements to deduce `fcPosInf`, `fcPosZero`, and
`fcPosSubnormal`.
- Zero can only be produced if `x < -1.0`.
- Subnormals can only be produced if `x < -1.0` and `x` is finite.
- Infinity can only be produced if `x > +1.0`.
```
fcPosInf: fcPosSubnormal | fcPosNormal | fcPosInf --> fcPosNormal | fcPosInf
fcPosZero: fcNegInf | fcNegNormal | fcNegSubnormal --> fcNegNormal | fcNegInf
fcPosSubnormal: fcNegInf | fcNegNormal | fcNegSubnormal --> fcNegNormal
```
AI disclosure:
I used ChatGPT Codex (5.6 sol) to help generate the tests which I
reviewed and tested locally.
[alpha.webkit.NoDeleteChecker] Handle CXXStdInitializerListExpr in trivial analysis (#224723)
TrivialFunctionAnalysisVisitor had no handler for
CXXStdInitializerListExpr, so a braced list bound to a
std::initializer_list fell through to VisitStmt and was conservatively
treated as non-trivial. This made any nodelete function containing e.g.
std::min({a, b, c}) report that it "contains code that could destruct an
object".
The backing array of a std::initializer_list is a temporary whose
lifetime ends in the enclosing function, so its elements really are
destructed there. Accept the node when the array's element type is
trivially destructible and recurse into the initializers, and keep
rejecting it otherwise.
[NFC][TSan] Allocate ScopedReport as a stack variable (#228637)
Now that ScopedReport is constructed before acquiring ThreadRegistryLock
or slot locks across all reporting functions (#228614), it no longer
needs to be constructed inside the lock scope via placement new on
__builtin_alloca storage (introduced in #151495).
Declare ScopedReport as a normal stack variable before the lock scope
and remove the manual destructor calls.
Assisted-by: Gemini
devel/sobjectizer: update the port to version 5.8.6.1
Infer the shared library version rather than hardcoding
it in the dependent `net/arataga' port.
Reported by: not portscout :(
devel/sobjectizer: update the port to version 5.8.6.1
Infer the shared library version rather than hardcoding
it in the dependent `net/arataga' port.
Reported by: not portscout :(
sysutils/ufs-utils: New port
ufs-utils is a userspace tool for Universal Flash Storage (UFS) devices.
It reads and writes descriptors, attributes, and flags, sends UIC
commands, and drives RPMB and advanced RPMB.
On FreeBSD it reaches the device through the ufshci(4) passthrough
ioctl and the CAM pass(4) device. The port is ignored when base does
not install the header for that ioctl.
Reviewed by: imp(mentor), lwhsu
Sponsored by: Samsung Electronics
Differential Revision: https://reviews.freebsd.org/D59721
sysutils/ufs-utils: New port
ufs-utils is a userspace tool for Universal Flash Storage (UFS) devices.
It reads and writes descriptors, attributes, and flags, sends UIC
commands, and drives RPMB and advanced RPMB.
On FreeBSD it reaches the device through the ufshci(4) passthrough
ioctl and the CAM pass(4) device. The port is ignored when base does
not install the header for that ioctl.
Reviewed by: imp(mentor), lwhsu
Sponsored by: Samsung Electronics
Differential Revision: https://reviews.freebsd.org/D59721
[compiler-rt][asan] Allow optional leading dot in function names in complete_stack_trace.c (#227969)
On AIX/XCOFF, the symbolizer reports function names with a leading dot
('.') because each function's executable code is stored in a separate
`.<funcname>` csect (the text-section entry point symbol). For example,
`read_2` is reported as `.read_2`.
The existing CHECK patterns required an exact match on the bare name,
causing the test to fail on AIX:
```
expected: {{ *#1 0x.* in read_2 .*complete_stack_trace.c}}
actual: #1 0x... in .read_2 complete_stack_trace.c:23
```
Use `\.?` inside the FileCheck regex blocks to make the leading dot
optional, matching both ELF (bare name) and XCOFF (dot-prefixed name)
symbolizer output.
Co-authored-by: Riyaz Ahmad <riyaz.ahmad at ibm.com>
[SelectionDAG] Implement SDTCisPtrTy in SDNodeInfo::verifyNode. (#229270)
If the node is a MemSDNode, use it to get the pointer address space.
Disable checking for one NVPTX opcode that has pointer operands, but is
not a MemSDNode.
Assisted-by: Claude
[RISCV] Lower (select c, (1 << ShAmount), 0) to (c << ShAmt). (#229205)
Generic DAG combine can already do this conversion, but sometimes
it can make it to lowering.
Assisted-by: Claude
[TSan] Lock ScopedErrorReportLock before slot and thread_registry locks (#228614)
Since #151495 and #228554, OutputReport runs while
ScopedErrorReportLock is held after slot_mtx and thread_registry have
been unlocked. Because code executed during OutputReport (symbolizer,
callbacks, or signal handlers) can acquire slot_mtx or thread_registry,
ScopedErrorReportLock must precede slot and thread_registry locks in the
lock hierarchy to avoid AB-BA deadlocks between concurrent reports or
fork().
- Move ScopedErrorReportLock::Lock() before slot.mtx, thread_registry,
and slot_mtx in ForkBefore (and unlock in reverse order in ForkAfter).
- Replace ctx->thread_registry.CheckLocked() in ScopedReport's
constructor with CheckedMutex::CheckNoLocks(), and add CheckLocked()
to AddThread(const ThreadContext *) and CheckNoLocks() to
OutputReport.
- Construct ScopedReport before acquiring ThreadRegistryLock across all
reporting functions, and close the RestoreStack lock scope before
constructing ScopedReport in ReportRace.
Assisted-by: Gemini
Revert "linux: implement fchmodat2 syscall"
This got accidentally committed when I was reverting another commit.
This reverts commit c070ec923e2f49b6ecb5a60b584ba8f4376a6e80.
Revert "linux: implement fchmodat2 syscall"
This got accidentally committed when I was reverting another commit.
This reverts commit c070ec923e2f49b6ecb5a60b584ba8f4376a6e80.
linux: implement fchmodat2 syscall
The fchmodat2 syscall on Linux is effectively the same as the fchmodat
on FreeBSD, whereas fchmodat on Linux is fchmodat on FreeBSD, minus
the `flags` argument.
This change provides the necessary glue in order to call kern_fchmodat
properly via the Linuxulator.
NB: glibc transparently passes through the `flags` argument, so this is
[largely] a no-op for end-users, but it affects those who compiled
binaries specifically using the fchmodat2 syscall.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D60394
Revert "linux: implement sched_getattr()"
The changes need to be reviewed further; revert until the issues have
been worked out.
Requested by: markj
This reverts commit bb5f10e51bd53771f1a438f36f554256fcbd7d08.
linux: implement fchmodat2 syscall
The fchmodat2 syscall on Linux is effectively the same as the fchmodat
on FreeBSD, whereas fchmodat on Linux is fchmodat on FreeBSD, minus
the `flags` argument.
This change provides the necessary glue in order to call kern_fchmodat
properly via the Linuxulator.
NB: glibc transparently passes through the `flags` argument, so this is
[largely] a no-op for end-users, but it affects those who compiled
binaries specifically using the fchmodat2 syscall.
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D60394
Revert "linux: implement sched_getattr()"
The changes need to be reviewed further; revert until the issues have
been worked out.
Requested by: markj
This reverts commit bb5f10e51bd53771f1a438f36f554256fcbd7d08.