[clang-tools-extra] Unify python shebangs (#187287)
As per PEP-0394[1], there is no real concensus over what binary names
Python has, specifically 'python' could be Python 3, Python 2, or not
exist.
However, everyone has a python3 interpreter and the scripts are all
written for Python 3. Unify the shebangs so that the ~50% of shebangs
that use python now use python3.
[1] https://peps.python.org/pep-0394/
[mlir:doc] Clarify requirements on `RewritePatterns`. (#218351)
This PR clarifies and extends the documentation of what
`RewritePattern`s and folders are allowed to do. The most noteworthy
addition is the requirement that they must produce verifiable IR. While
this is enforced by `MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS`, it has
not been mentioned in the markdown docs yet. The other changes are
clarifications on edge cases that I have seen people misunderstand or
overlook. The change also adds a note to the build flag that enables the
API checks.
---------
Signed-off-by: Ingo Müller <ingomueller at google.com>
[analyzer] Implement potential underflow warnings (#216077)
The `security.ArrayBound` checker is able to report potential
out-of-bounds access when it detects that the accessed offset is tainted
(potentially attacker-controlled).
However, until now this only reported cases where _overflow_ was
possible with the tainted offset. (This is probably an accidental
oversight -- in the old implementation it was easy to forget adding a
second check that would report the "potential underflow with tainted
offset" case.)
This commit corrects this oversight and ensures that potential underflow
with a tainted offset is also correctly reported.
Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
[ORC] Use a weak recordAddr in runSymbolIfExists (#218591)
COFFPlatform::runSymbolIfExists resolved the symbol as required, then
swallowed the resulting SymbolsNotFound error. Use a weakly-referenced
recordAddr and test the address instead. This was the last non-test
caller of lookupAndRecordAddrs.
[libc++] Remove _LIBCPP_SHORT_WCHAR (#207562)
We can just check for `sizeof(wchar_t)` in most places instead. The only
place that seems problematic is `test_macros.h`, where we can use
`__SIZEOF_WCHAR_T__` instead.
[libc++] Optimize vector::erase (#213916)
This optimization is for trivially relocatable types. Instead of move
assigning the tail and then destroying the last N elements, we now
destroy the elements that are erased and then relocate the tail forward.
[NFC][analyzer] Remove class 'NodeBuilderContext' (#218442)
The class `NodeBuilderContext` was heavily distorted during the ad hoc
development of the analyzer: it was not actually that useful for
building nodes (it could have been replaced by a single pointer to the
`CoreEngine`), but it gained a second unrelated role that it was
involved in the only way to query the current `CFGBlock`. This class had
no actual advantage, but until the start of this year it was widely used
in low quality parts of the engine code.
After dozens of cleanup commits I was finally able to remove
`NodeBuilder` in 3a8697fab84c8d61e7fc4370c19bdd5023391716, so now I can
remove `NodeBuilderContext` in this commit.
py-zeroconf: adapt PLIST for cython 3.3.0
cython 3.3.0 is more strict in checking signatures, which stops it
building the C extension for py-zeroconf.
Reported this upstream, remove the .so files from the PLIST for now.
Bump PKGREVISION.
[lldb] Evaluate DW_OP_mod with unsigned arithmetic (#218383)
LLDB currently passes the signed `Scalar` values produced by
`DW_OP_consts`
directly to `Scalar::operator%`. As a result, the issue expression
evaluates
`-1 % 2` as signed remainder `-1` instead of interpreting the all-one
address-sized value modulo 2 as `1`.
Make local copies of the `DW_OP_mod` dividend and divisor unsigned
before
applying the existing modulo operator. The change is contained entirely
in
the opcode evaluator and does not alter the global `Scalar`
implementation.
Update the `DW_OP_mod` unit test with the issue reproducer.
Tests:
[8 lines not shown]