[lldb] Let language runtimes fix up pointers to instances (NFC) (#243261)
Currently ValueObjectChild uses the pointer value of a parent whose
instances are pointers as the address of the instance. A language
runtime that stores extra information in the spare bits of such
pointers, or that refers to some instances indirectly (for example,
Swift does for unowned references to Objective-C objects) has no way to
correct the address.
This patch fixes this by adding LanguageRuntime::FixupPointerValue(),
which ValueObjectChild calls for parents whose type has
eTypeInstanceIsPointer. No type system in LLVM sets that flag yet.
Assisted-by: Claude
devel/woodpecker, devel/woodpecker-agent: New ports
Woodpecker is a CI/CD engine driven by YAML pipelines in the repository,
for Forgejo, Gitea, GitHub, GitLab and Bitbucket.
devel/woodpecker installs the server (web UI and API) and the CLI;
devel/woodpecker-agent, a slave port, installs the agent, which runs
pipelines with the local backend. Agents usually run on other hosts than
the server, and only the agent needs git and plugin-git.
The release's source tarball carries vendor/ and the built web UI, so
nothing is fetched at build time.
Add the woodpecker user and group (408).
WWW: https://woodpecker-ci.org/
Reviewed by: dtxdf
Approved by: dtxdf (mentor)
Differential Revision: https://reviews.freebsd.org/D61666
devel/woodpecker-plugin-git: New port
plugin-git clones the repository at the start of a Woodpecker CI
pipeline. With the local backend, woodpecker-agent runs it from PATH;
without it, the agent downloads a binary from GitHub at runtime.
WWW: https://github.com/woodpecker-ci/plugin-git
Reviewed by: dtxdf
Approved by: dtxdf (mentor)
Differential Revision: https://reviews.freebsd.org/D61665
sysutils/cni-epair: Update to 1.2.2
Apply configured MTU (or the bridge's own MTU by default) to both ends
of the epair, keep error messages valid JSON, return the DHCP lease's
DNS server in dns.nameservers, and search CNI_PATH before
${LOCALBASE}/libexec/cni for IPAM plugins.
Changelog: https://github.com/daemonless/cni-epair/releases/tag/v1.2.2
Reviewed by: dtxdf
Approved by: dtxdf (mentor)
Differential Revision: https://reviews.freebsd.org/D61688
sysutils/cni-epair: Update to 1.2.2
Apply configured MTU (or the bridge's own MTU by default) to both ends
of the epair, keep error messages valid JSON, return the DHCP lease's
DNS server in dns.nameservers, and search CNI_PATH before
${LOCALBASE}/libexec/cni for IPAM plugins.
Changelog: https://github.com/daemonless/cni-epair/releases/tag/v1.2.2
Reviewed by: dtxdf
Approved by: dtxdf (mentor)
Differential Revision: https://reviews.freebsd.org/D61688
kernel: reset the tty drain timeout after a session exits
exit1() forces t_timeout to one second while it drains the
controlling terminal of an exiting session leader, and leaves it
there. The tty outlives the session, so the next session on it (a
reused pty) gets EIO from any write that waits more than a second for
output space. dsynth runs into this, with gmake failing with "write
error: stdout".
Reset it to 0, the default, after ttywait(). Restoring the old value
would also carry over a timeout the session set with TIOCSDRAINWAIT.
Bug: https://bugs.dragonflybsd.org/issues/3469
devel/py-pyutil: Update to 3.4.1
pyutil still has Python 2 code that fails at run time on every Python
3; upstream master has the same code. Fix it:
- scripts/verinfo imports the Python 2 exceptions module.
- cache, odict, dictutil, memutil and humanreadable use next() only
iterators, has_key(), iteritems()/iterkeys(), dict views as lists, a
lazy map() for eviction, the reduce, unicode and long builtins and
func_name/im_func; SmallOrderedDict's iterators and setdefault() were
wrong as well, and describe_all_objects() did an implicit relative
import.
- benchutil imports threading as thread but calls _thread functions,
and makeg() uses xrange.
- The console scripts: randfile and lines write str to binary files,
lines and passphrase -d use the 'rU' mode removed in Python 3.11,
try_decoding calls .decode() on a str, randcookie passes a float to
os.urandom() and imports zbase32, which is not ported (encode
z-base-32 locally instead).
- platformutil.get_linux_distro() uses 'rU' and platform.dist();
[26 lines not shown]
devel/py-pyutil: Update to 3.4.1
pyutil still has Python 2 code that fails at run time on every Python
3; upstream master has the same code. Fix it:
- scripts/verinfo imports the Python 2 exceptions module.
- cache, odict, dictutil, memutil and humanreadable use next() only
iterators, has_key(), iteritems()/iterkeys(), dict views as lists, a
lazy map() for eviction, the reduce, unicode and long builtins and
func_name/im_func; SmallOrderedDict's iterators and setdefault() were
wrong as well, and describe_all_objects() did an implicit relative
import.
- benchutil imports threading as thread but calls _thread functions,
and makeg() uses xrange.
- The console scripts: randfile and lines write str to binary files,
lines and passphrase -d use the 'rU' mode removed in Python 3.11,
try_decoding calls .decode() on a str, randcookie passes a float to
os.urandom() and imports zbase32, which is not ported (encode
z-base-32 locally instead).
- platformutil.get_linux_distro() uses 'rU' and platform.dist();
[26 lines not shown]
[WebKit checkers] Honor NOESCAPE on a parameter of a type with a trivial destructor (#242582)
webkit.UncountedLambdaCapturesChecker and related checkers reported a
lambda passed to a NOESCAPE parameter of type WTF::ScopedLambda, as in:
bool doBytesMatchMetadataList(..., const FragmentedSharedBuffer* bytes,
...) {
return doBytesMatchMetadataList(tainting, [&](auto algorithm) {
return cryptographicDigestForSharedBuffer(algorithm, bytes);
}, metadataList);
}
findLambdaInArg looked for the lambda in an argument which constructs a
temporary only when the construction was wrapped in a
CXXBindTemporaryExpr. A temporary of a type with a trivial destructor,
such as WTF::ScopedLambda, isn't wrapped in one, so the lambda wasn't
found, and the checker instead saw it passed to ScopedLambda's
converting constructor, whose parameter isn't NOESCAPE.
[5 lines not shown]
[lldb] Fix an assert on type lookup with a standalone line table (#243500)
`UpdateExternalModuleListIfNeeded()` walked the DWARF units with
`GetNumCompileUnits()` as the bound. Since #217932, a file with
`.debug_line` and no `.debug_info` has compile units made from its line
tables and no DWARF units. The loop then passed a null unit to
`dyn_cast`, which will assert.
Bound the loop with the DWARF unit count instead.
[SampleProfile] Recover indirect targets after iterative inlining
An indirect fallback survives when a target is promoted and inlined. Recording its hottest target on every scan can therefore merge samples from an inline copy into the standalone function. Recording only one target also loses samples for other targets that stay out of line.
Collect recovery candidates from the calls that remain after inlining finishes. Use the existing promotion history to exclude promoted targets from the fallback, and recover promoted direct calls separately if they did not inline. This also handles promotion without a successful inline or another iteration.
[lldb] Let language plugins explain why a variable is missing (#243296)
Currently, when a variable path names a variable that the frame doesn't
have, frame variable and SBFrame::GetValueForVariablePath() only report
that there is no such variable.
This patch adds an API so a language plugin can add a custom hint for
why, for example because the frame is a closure that didn't capture a
variable of that name from its parent function.
Assisted-by: Claude
[lldb] Fix use-after-free in TypeList::Dump (#243232)
Type::Dump calls CompilerType::DumpTypeDescription, which completes a
forward-declared record type. Completing the record parses its member
types, and SymbolFileCommon::MakeType appends each new type to the same
TypeList that TypeList::Dump is iterating. When that reallocates
m_types, the range-based for loop keeps using iterators into the freed
buffer.
`target modules dump symfile` hits this when the type list holds a
forward declaration of a record with many member types. Usually the type
dump just stops early. When the freed memory has been reused, lldb
crashes. Valgrind reports an invalid read in TypeList::Dump of a block
that std::vector::_M_realloc_insert freed under
SymbolFileCommon::MakeType.
Iterate by index instead, so the loop always reads the current buffer.
Types that are added during the dump are now dumped as well.
[2 lines not shown]