[flang][cuda] Add cuf.device_address conversion into separate pass (#177035)
Some conversion are better done later in the pipeline. Add
cuf.device_address conversion in its own pass so it can be scheduled
late.
The pattern will be removed from CUFOpConversion once this pass has
landed.
[NFC][LTO] Move isPreservedName out of IRSymtab into LTO's Symbol
This resolves the FIXME in IRSymtab and cleans up the semantics of the
IRSymtab. The list of preserved symbols really shouldn't be seen as a
property of the IR symbol table, since it's an LTO-specific concern, and
it's very tenuous to claim that this information is actually present in
the bitcode file to be exposed through its symbol table.
Instead, this PR moves this logic into LTO's view of the symbol, which
allows consumers to determine preserved-ness themselves. This was broken
out of #164916; this prevents that PR from introducing a circular
dependency, but it still seems like an independently good idea by virtue
of the above.
[SPARC] Prevent RESTORE from sourcing from %o7 in call delay slots (#172593)
Combining instructions that reads from %o7 with a RESTORE in call delay
slots will result in a RESTORE instruction that reads from %o7, which
has been overwritten by the call instruction, resulting in junk values
being produced.
This should fix the issue with `test-suite::lencod.test`.
[libc][linux] add support to parse PT_GNU_PROPERTY (#174772)
In order to add Control-flow Enforcement Technology (CET) Shadow Stack
(SHSTK) support, we need to parse the `PT_GNU_PROPERTY` program header
and the corresponding section to evaluate if the binary being started
was compiled with the necessary support.
PS: This is my first PR to llvm-libc, I might have made obvious styling
mistakes so I'd appreciate any feedback or suggestions to improve it.
I have a prototype branch using this change to enable SHSTK support:
https://github.com/jakos-sec/llvm-project/tree/add-shstk-support
netstat: fix a segfault with --libxo
Fix a segfault when printing the "protocol" field. The field-format and
encoding-format were expecting different numbers of arguments.
Also, fix the width of the tcp-state field in encoded output.
PR: 292228
Fixes: c2b08c13c20 netstat: add support for UDP-Lite endpoints
Sponsored by: ConnectWise
Reviewed by: tuexen, js, des
Differential Revision: https://reviews.freebsd.org/D54567
(cherry picked from commit 3b6615ec0332f901fcc9e9307f78717424f09c1e)
fusefs: Fix further intermittency in the BadServer.ShortWrite test case
After being unmounted, the mockfs server would occasionally read from
/dev/fuse again, if the main function didn't exit fast enough, getting
an ENODEV error. Handle that appropriately.
Reported by: Siva Mahadevan <me at svmhdvn.name>
Fixes: d86025c1d49c84c4dc8c3635c83c078ad56e5a53
Reviewed by: Siva Mahadevan <me at svmhdvn.name>
Differential Revision: https://reviews.freebsd.org/D54331
(cherry picked from commit f51e9d0e0988df58c94db586ab5c8b5fd091c004)
gpart: "gpart --libxo:JP list" duplicates attribute keys
Add leaf-list modifier to attrib as it's possible to have multiple
attributes on a gpart provider.
I purposely made it so that the normal output still says "attrib:" just
so we don't break any scripts people may be using to parse the output,
but the libxo output now says "attribute" just like `gpart show` will do
once https://reviews.freebsd.org/D53950 is merged.
PR: 291377
Reviewed by: asomers
Sponsored by: ConnectWise
Differential Revision: https://reviews.freebsd.org/D54080
(cherry picked from commit a0347b0f3a6088872c29eddb85154478d543dffb)
[AArch64] Consider MOVaddr* as cheap if fuse-adrp-add
These pseudo-instructions usually translate into a pair of adrp+add and
have a single cycle latency on some micro-architectures.
emulators/wine-devel: Streamline things a bit
Set BINARY_ALIAS and EXTRA_PATCHES using plain assignment (=) instead
of := since we do not have child ports any longer.
This forward ports most of commit 0535ec4919 for emulators/wine.
[libc] Reland %lc support in printf (#176110)
Add support for %lc in printf by calling internal wcrtomb function and
relevant end-to-end sprintf test.
Additionally, made the following changes:
- Modified printf parser for recognizing length modifier
- Added two internal error codes.
- Added a flag to disable wchar support on windows platform.
- To keep printf interface header only, converted wcrtomb and
CharacterConverter to header only implementation and removed the cpp
source.
Resolves GPU libc issues in #169983 and original issue: #166598
---------
Co-authored-by: shubhe25p <shubhp at mbm3a24.local>
Co-authored-by: Joseph Huber <huberjn at outlook.com>
Refresh alias cache before updating static routes. Fix #16407
The code which updates static routes relies on a global alias variable to
determine what changes are needed. Once an alias is updated the global
variable must be refreshed so route changes reflect the latest config.
Also include "network" aliases when detecting static route aliases.
[LLDB] Close previously opened handles in `PseudoConsole` (#176775)
In
https://github.com/llvm/llvm-project/pull/175837#issuecomment-3749408432
I mentioned that any handles that were previously opened and haven't
been closed since, won't be closed in the destructor nor in
`OpenPseudoConsole`.
In this PR, I added `Close` calls to these methods. Calling `Close()` is
a no-op if the handles are invalid.
AArch64/GlobalISel: Use LibcallLoweringInfo in utils (#176946)
Wire up the boilerplate to get the query for bzero from
LibcallLoweringInfo instead of TargetLowering.
astro/osmium-tool: Upgrade to v1.19.0
ChangeLog: https://github.com/osmcode/osmium-tool/blob/master/CHANGELOG.md
Added
* Add integration tests for show command output formats.
Changed
* Switch to C++17 as minimum requirement.
* Use std::back_inserter instead of boost::function_output_iterator removing
one dependency on Boost.
* Various small fixes and code cleanups.
Fixed
* Fix ID comparison in osmium merge to match osmium sort behavior.
* Extract in "simple" mode: Check all nodes in a way for overlap with the
[3 lines not shown]
[Offload] Cast to `void *` in the debug message (#177019)
There are a few places where data types based on character array or
string are printed in the debug message while they do not represent
strings. Such expressions should be casted to `void *` unless they
represent actual strings. Change also includes casting from integral
type to pointer type when appropriate.
Zstd: Document update policy
Add the Zstd update policy to the subtree README.
Also update the documented location of zstd-in.c to match upstream
changes, and normalize naming from 'ZSTD' to 'Zstd'.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Moch <mail at alexmoch.com>
Closes #18089
Zstd: Restore SPDX license identifiers
When updating Zstandard to version 1.5.7 the SPDX license identifiers
were lost. This commit restores them.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Moch <mail at alexmoch.com>
Closes #18089
Zstd: Fix ASan poisoning for pooled Zstd contexts
The Zstd context mempool can reuse buffers that were previously poisoned
under AddressSanitizer, leading to false-positive use-after-poison reports
during zloop and other stress tests.
Explicitly unpoison memory when handing buffers out to Zstd and poison the
user-visible region again when buffers are returned to the pool. This makes
the allocator ASan-correct while preserving existing pooling behavior.
Also fix non-standard void * pointer arithmetic in zstd_free() and remove an
early return in zstd_dctx_alloc() so kmem_type/kmem_size are always set on
pool hits.
This only affects ASan bookkeeping in user space, does not change runtime
behavior in non-ASan configurations, and does not affect on-disk formats.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Alexander Moch <mail at alexmoch.com>
Closes #18089