Fix signatures by properly getting string lengths.
In the conversion from xstring to sb, 2 length variables were missed causing
all signatures to fail.
Fixes: 88021b4c7a35f97b0663036552072c9661917b56
[libc][math] Make pow function correctly rounded for all rounding modes. (#222827)
Fix overflow issues reported by Paul Zimmermann.
Algorithm overview:
Evaluate mainly as:
```
x^y = 2^(y * log2(x))
```
- Fast path:
- Compute `log2(x) = e_x + log2(m_x)` in double-double precision.
- Scale `y * log2(x)` and evaluate `2^(y * log2(x)) = 2^hi * 2^mid *
2^lo`
using a 64-entry lookup table for `2^mid` and a degree-5 polynomial
evaluated with Estrin's scheme for `2^lo`.
- Perform Ziv's rounding test.
- 128-bit accurate path (pow_accurate_128.h):
[24 lines not shown]
p5-podlators: update to 6.1.1.
Security fix release.
v6.1.1 - 2026-09-09
- Avoid errors or an infinite loop in Pod::Text and its subclasses when
attempting to wrap text whose margin equals or exceeds the output width.
Instead, report an error and force the margin to zero. Thanks to Jitka
Plesnikova for the report. (CVE-2026-82560)
- When Pod::Text::Overstrike wraps a line at a bold or underscored space,
avoid leaving partially formatted spaces at the start of the subsequent
line.
[AMDGPU] Add LDS encoding granularity to TargetParser
Model LDS encoding granularity with dedicated features and expose the
byte-valued getLDSEncodingGranule query for GPUKind and subarch. Keep
encoding independent of the hardware allocation granularity used for
occupancy; GFX10.3, GFX11 and GFX12.0 encode in 512-byte units while
allocating 1024-byte blocks.
Migrate program resource register and PAL metadata encoding to the new
query and remove getLdsDwGranularity from AMDGPUBaseInfo. gfx9-4-generic
uses gfx950's 1280-byte encoding granule independently of LDS capacity.
Test encoding queries, feature membership, generic-target validation and
encoded LDS sizes, including the GFX10.3 allocation/encoding distinction.
Change-Id: I9d3c2c041605e9a45fa8fbda09fc3460a74953ea
[AMDGPU] Add getLDSAllocGranule to TargetParser
Model hardware LDS allocation granularity with dedicated features and
expose byte-valued queries for GPUKind and subarch. Use the allocation
query for occupancy while retaining the existing LDS encoding helper.
GFX10.3, GFX11 and GFX12.0 allocate in 1024-byte blocks, even though LDS
size is encoded in 512-byte units. Correct their allocation values and
occupancy expectations as discussed in #219495. gfx9-4-generic uses
gfx950's 1280-byte allocation granule independently of its 64 KiB capacity.
Test allocation feature membership, per-GPU assignments, query overloads,
fallbacks, generic-target validation and occupancy.
Change-Id: Ic0c9345e7657ec3c6978a646628598cb7608b390
[libc][math] Add code size optimized float-only options for exp*f funtions. (#224735)
- Add float-only implementations for expf, exp2f, and exp10f optimized
for code-size.
- Reorganize function selections:
- `src/__support/math/func.h` - select implementation
- `src/__support/math/func_<type>_eval.h` - implementation with `<type>`
as intermediate computational type.
- keep different `<type>-eval` in `type_eval` namespace, so that all
options are available to be tested.
- Update smoke, unit, exhaustive tests to test all variants.
Assisted-by: Gemini is used for code size analysis and test refactoring.
---------
Co-authored-by: Muhammad Bassiouni <60100307+bassiounix at users.noreply.github.com>
[BoundsSafety][test] Add late-parsed counted_by type-attribute coverage
New tests exercising the late-parse fill-in mechanism:
- Sema/attr-counted-by-weird-type-positions{,-late-parsed}.c: counted_by
in assorted type positions, nested pointers, and rejection cases.
- Sema/attr-bounds-safety-function-ptr-param.c: attributes on
function-pointer-typed members.
- Modules/ and PCH/ bounds-safety-attributed-type-late-parsed: the
resolved type round-trips through serialization.
- Sema/attr-counted-by-late-parsed-regressions.c: guards against the
double-free on a nested-record decl-spec attribute and the null-count
escape on a free-function parameter.
[BoundsSafety] Create incomplete counted_by types and wire up the refill
Activate late parsing for the counted_by family (counted_by / sized_by and
their _or_null variants) in type-attribute position, under
-fexperimental-late-parse-attributes, on top of the type-attribute handling,
the validation helper and the refill machinery added in the previous commits.
When such an attribute is seen during type construction and its argument
can't be resolved yet, build the CountAttributedType immediately with
getIncompleteCountAttributedType and record it against the enclosing record;
its count expression is filled in at the closing brace via the refill logic.
Because enclosing types refer to the node by pointer, completing it in place
leaves the type chain untouched -- no rebuild, no TypeLoc re-emission.
- Sema::ActOnLateParsedTypeAttr builds the incomplete node; the parser
callback stores it on the LateParsedTypeAttribute and records the
attribute in the record currently being parsed.
Parser::CompleteLateParsedTypeAttributes drains that list at the closing
brace; a nested anonymous record hands its pending attributes up to the
[9 lines not shown]
[BoundsSafety] Handle the counted_by family as a type attribute
counted_by / sized_by (and their _or_null variants) were handled in only one
way: a declaration-position attribute went through handleCountedByAttrField,
which validated it and then patched the field afterwards with
FieldDecl::setType. There was no type-position handling at all.
Build the type during type construction instead, from a single handler that
serves both positions:
- Add HandleCountedByAttrOnType and dispatch the counted_by family to it
from processTypeAttrs, going through the shared
validateBoundsAttrTypeForTypePosition leaf.
- Remove handleCountedByAttrField. Its FieldDecl-based type-shape checks in
Sema::CheckCountedByAttrOnField are superseded by
Sema::ValidateBoundsAttrTypeShape, added in the previous commit and now
reached from the type path, and are deleted; no diagnostic is dropped. The
checks that genuinely need the FieldDecl (union member, non-flexible
array, cross-struct count) stay in CheckCountedByAttrOnField and run from
[11 lines not shown]
[BoundsSafety][NFC] Thread a late-parsed attribute list through declarators
A late-parsed type attribute is written in the middle of a declarator, so the
list it lands in has to travel with the declarator pieces until the enclosing
record can supply its argument. Add that storage and plumbing, with nothing
producing or consuming it yet:
- Move CachedTokens and LateParsedAttrList earlier in DeclSpec.h so DeclSpec,
Declarator and DeclaratorChunk can hold one.
- Give DeclSpec, Declarator and DeclaratorChunk a LateParsedAttrList, and let
Declarator::AddTypeInfo carry one onto the chunk it appends.
- Give ParseSpecifierQualifierList and ParseTypeQualifierListOpt an optional
LateParsedAttrList parameter, passed down to ParseDeclarationSpecifiers.
No functional change: the lists stay empty and no caller passes one. The next
commit populates them.
[BoundsSafety][NFC] Add the Sema/Parser bridge for late-parsed type attributes
A late-parsed bounds attribute has to build its type when the attribute is
seen, but its argument isn't parseable until the enclosing record is complete.
Building that type needs the Parser (which owns the cached tokens) and Sema
(which owns type construction) to meet:
- Sema::ActOnLateParsedTypeAttr validates a counted_by-family attribute for
the type position and, if valid, wraps the type in a CountAttributedType
whose count is not yet known, handing the node back for completion.
- Parser::ProcessLateParsedTypeAttrCallback is the Parser-side entry point,
registered on Sema so Sema can call back without including Parser.h (the
same pattern as LateTemplateParserCallback). It reuses an already-built
node so several declarators sharing one attribute share one type.
No functional change: nothing records late-parsed type attributes yet, so the
callback is never invoked. The next commit wires it up.
[BoundsSafety][NFC] Add the count-refill logic for late-parsed bounds attributes
Introduce the machinery that fills in a late-parsed bounds attribute's
argument once the enclosing record is complete, without wiring it up yet.
Nothing creates an incomplete CountAttributedType or records one for
completion at this point, so this is inert -- the functions are unused and
behavior is unchanged. Activation follows in the next commit.