[libc] Add getpwnam_r and getpwuid_r entrypoints (#220833)
Added reentrant getpwnam_r and getpwuid_r functions using the
FlatFileDatabase lookup engine.
* Implemented getpwnam_r and getpwuid_r entrypoints
* Added find_by_name and find_by_uid lookups under namespace passwd
* Added function specifications to include/pwd.yaml
* Registered entrypoints in config/linux/*/entrypoints.txt
* Added unit tests in libc/test/src/pwd/getpwnam_r_test.cpp and
libc/test/src/pwd/getpwuid_r_test.cpp
Assisted-by: Automated tooling, human reviewed.
[NFC][LowerTypeTests] Add tests for CFI jump table hotness ordering (#221045)
Add pre-commit test coverage establishing the baseline CFI jump table
layout before implementing hotness-based reordering in
https://github.com/llvm/llvm-project/pull/221046:
- cfi-jumptable-hotness.ll: checks jump table entry layout with IR
function attributes (hot/cold) and entry count profile metadata.
- cfi-jumptable-hotness-summary.ll: checks jump table entry layout
with ThinLTO module summary call edge hotness types (using text
summary IR and split-file).
These tests verify the baseline declaration-order layout where functions
within each strict type are placed without hotness consideration, making
the subsequent reordering diff explicit and easy to review.
PR Stack:
* https://github.com/llvm/llvm-project/pull/220776
* https://github.com/llvm/llvm-project/pull/221043
* https://github.com/llvm/llvm-project/pull/221044
[3 lines not shown]
18394 dump_ttrace faults resolving a spurious-vector trap trace record on apix
Reviewed by: Bill Sommerfeld <sommerfeld at hamachi.org>
Reviewed by: Toomas Soome <tsoome at me.com>
Approved by: Robert Mustacchi <rm+illumos at fingolfin.org>
18380 check_rtime and interface_check could process objects in parallel
Reviewed by: Luqman Aden <luqman at oxide.computer>
Reviewed by: Bill Sommerfeld <sommerfeld at hamachi.org>
Approved by: Robert Mustacchi <rm+illumos at fingolfin.org>
[clang][docs] Document compile-time sanitizer suppressions and options (#218793)
Document compile-time default suppressions
(`__<sanitizer>_default_suppressions`) and default options
(`__<sanitizer>_default_options`) across AddressSanitizer,
LeakSanitizer, and ThreadSanitizer. Document all supported suppression
types for ASan and TSan, programmatic leak checking interfaces for LSan,
and explain independent options evaluation when ASan runs with
integrated LSan/UBSan.
Fixes https://github.com/google/sanitizers/issues/1628
**AI tool usage:** An AI assistant was used to help research and draft
the documentation updates.
[flang][Semantics] reject COMMON/EQUIVALENCE/derived types whose size does not fit in int64 (#219976)
Semantics was not enforcing the overall byte sizes when of
common block and equivalence storage when building the related symbols
and computing offsets for members. The size and offset silently
overflow, leading to computing inconsistent offsets in lowering and
aborting compilation with internal errors like "error: 'hlfir.declare'
op storage offset exceeds the storage size".
This patch limits the storage of such objects to what can fit a signed
64 bit integer (like gfortran/ifx/classic flang).
Assisted-by: AI
[lldb][test] Disable TestBreakOnLambdaCapture.py on Windows on Arm (#220944)
Something is wrong with the breakpoint handling which makes it flakey on
our bot.
https://github.com/llvm/llvm-project/issues/220942
[CIR] Give the cleanup kind a proper standalone attribute spelling
CleanupKindAttr overrode its assembly format to a bare `$value` so
`cir.cleanup.scope` would print `cleanup all`. The cost was that the
attribute had no readable standalone form, falling back to
`#cir<cleanup_kind all>`.
The `enum($attr)` operation directive removes the tradeoff. The attribute
keeps CIR_EnumAttr's bracketed default and now spells `#cir.cleanup<all>`,
while the operations ask for the bare keyword. The mnemonic drops the `_kind`
suffix the C++ class name carries.
Operation syntax is unchanged. invalid-loop-cleanup.cir now gets one
diagnostic from the enum parser instead of two.
tcp md5: improve consistency
All other usages of SCF_SIGNATURE are protected by IPSEC_SUPPORT
or TCP_SIGNATURE.
No functional change intended.
Reported by: Hannes Elfert
MFC after: 1 week
MFC to: stable/14
MFC to: stable/15
[mlir][complex] Avoid cancellation in tanh denominator (#221014)
In ComplexToStandard lowering of `complex.tanh`, the denominator
expansion includes an exponential term:
$\text{denom} = \text{expm1}(2a) + \text{expm1}(-2a) + 4\cos^2(b)$
When $a$ is small, $\text{expm1}(2a) \approx 2a + 2a^2$ and
$\text{expm1}(-2a) \approx -2a + 2a^2$ have opposite signs. Adding them
cancels the leading $\pm 2a$ terms, resulting in loss of precision.
Near poles ($b \approx \pi/2$), $4\cos^2(b)$ vanishes and this
cancellation
dominates the denominator, causing large relative errors in both real
and imaginary parts.
Since $-(e^{2a} - 1)(e^{-2a} - 1) = e^{2a} + e^{-2a} - 2 =
\text{expm1}(2a) + \text{expm1}(-2a)$,
this term can be evaluated via multiplication instead:
$\text{denom} = -\text{expm1}(2a) \cdot \text{expm1}(-2a) + 4\cos^2(b)$
[5 lines not shown]