[lld][WebAssembly] Do not coalesce segments with differing flags in -r (#219606)
In PR #210747 (commit 162d9f09299d), `addInputSegment` was changed to
union segment linking flags (`linkingFlags |= inSeg->flags`) so that
flags like `RETAIN` and `STRINGS` are preserved in `--relocatable`
output.
However, coalescing segments with differing linking flags by name alone
forces one chunk's semantics onto another:
- Clang emits ordinary string literals (`STRINGS`) and string literals
containing embedded null characters (non-`STRINGS`) into sections
named `.rodata..L.str`. When coalesced, non-mergeable segments
received the `STRINGS` flag, causing downstream links to split and
corrupt them.
- Similarly, coalescing a chunk with `RETAIN` and a chunk without
`RETAIN` forces the un-retained chunk to inherit `RETAIN`, preventing
`--gc-sections` from discarding it if it is unused.
Fix this by distinguishing segments by their linking flags in
[3 lines not shown]
[clang][Parse] Stop parsing declarator chunks after a parenthesized structured binding (#219270)
Fixes #218144
Fixes #193687
`ParseDirectDeclarator` stops right after a structured binding like `[a,
b]`, since nothing can follow it — but that check only covers the
unparenthesized form. For `([a, b])`, the binding gets parsed inside
`ParseParenDeclarator`, and the outer `ParseDirectDeclarator` doesn't
notice — it carries on into its suffix loop and parses a trailing `()`
as a function declarator. `([a, b])() {}` then looks like a function
definition, so `ActOnStartOfFunctionDef` gets handed a
`DecompositionDecl` where it expects a `FunctionDecl`:
`cast<FunctionDecl>` asserts, or segfaults later without assertions —
that's #193687. (The `b;` in the report is noise; `([a])() {}` alone
crashes.)
This patch makes `ParseDirectDeclarator` stop as well when the
parenthesized declarator turns out to be a structured binding, so
[8 lines not shown]
[SLP]Fix undef/poison matching in TreeEntry::isSame
Undef no longer matches poison mask elements (poison is stronger than
undef and its lane is unrecoverable); poison matches any lane.
Fixes #219631
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/219704
[IR] Add helpers to AllocaInst to avoid getAllocatedType(). (#219594)
Add AllocaInst::getAllocationBaseSize() and AllocaInst::isScalable(),
which represent common patterns for uses which only need the size of an
alloca, but can't use getAllocationSize().
This only replaces uses which are equivalent. (There are a couple of
places in DebugInfo which getTypeSizeInBits(), which is not equivalent,
so this patch doesn't touch them for now.)
net/wakeonlan: update 0.42 -> 0.50
Changelog: https://raw.githubusercontent.com/jpoliv/wakeonlan/refs/heads/master/Changes
Major changes:
- doc:change license from Artistic to Artistic-2.0
- fix: accept named pipes (FIFOs) as valid --file input
- fix: normalize single hex digit fields to two hex digits
- fix: fall back to port 9 when the discard service is unknown
- feat: add delay option
Fix a segfault that bluhm@ found on his i386 regress machine.
Even in the "out:" code path of the escape sequence parser,
for rval == ESCAPE_SPECIAL, some of the parsing results are
still used for error reporting purposes, specifically to
distinguish valid and invalid character names.
So, when parsing fails so badly that there is no name whatsoever,
it is not sufficient to bail out via "goto out;" but in addition,
we must make sure that the return value does not remain ESCAPE_SPECIAL.
However, other return values must remain intact even in case of
extremely bad parsing errors. For example, an \A escape sequence
still qualifies as an ESCAPE_EXPAND sequence and must expand
to the string "0" even if it lacks any argument whatsoever.
net-mgmt/pmacct: update 1.7.8 -> 1.7.9
- Note: PGSQL option is broken
- fixes build problem with libcdada
PR: 298037
Reported-by: info at ubilling.net.ua
Reported-by: olivier
mount_lfs(8): Add unreachable() to fix clang build.
dependall ===> sbin/mount_lfs
/home/source/ab/HEAD-llvm/src/sbin/mount_lfs/mount_lfs.c:319:1: error: function declared 'noreturn' should not return [-Werror,-Winvalid-noreturn]
The only two cases in invoke_cleaner are already handled, so the rest
should be unreachable.
Move /tmp clearing earlier in /etc/rc
Moving pruning above relinking and early daemon startup to be able
to clear everything old without removing entries that are in use.
The goals are:
1) free up at least one inode, because mkstemp needs at least one
2) free up a few more, just in case. We settled on 50.
3) With an inode freed up for mktemp, create a directory and move all the
deleteable files into that directory and remove it asyncronously.
The first two goals were very fiddly to get right.
Much help and discussion with deraadt@ plus dlg@ and kn@
ok for an earlier diff from kn@
[libc] Disable float16 on 32-bit x86 without SSE2 (#219675)
Fixes #219668
Building llvm 23.1.0 (and current main) for 32-bit x86 without SSE2
fails since APFloat.cpp started including libc's shared/math.h. All the
errors come from the float16 headers:
```
libc/src/__support/FPUtil/BasicOperations.h:63:67: error: SSE register return with SSE2 disabled
libc/src/__support/math/acosf16.h:73:14: error: invalid conversion from type '_Float16' without option '-msse2'
```
The float16 detection in float16-macros.h checks __FLT16_MANT_DIG__.
Since GCC 14 that macro is defined on ia32 even without SSE2, where
_Float16 is storage-only and any arithmetic or returning by value is an
error.
The GCC 14 release notes say to check __SSE2__ for arithmetic support
instead: https://gcc.gnu.org/gcc-14/changes.html
[9 lines not shown]
[X86] Fold ADC(SHL(X, 1), 0, Carry) to ADC(X, X, Carry) (#219512)
During DAG optimization, expressions like `a + a` are canonicalized to
`a << 1` (`ISD::SHL X, 1`).
We need to undo that if we can use adc x, x.