libc: reject a negative wchar_t in the UTF-8 encoder
_UTF8_wcrtomb() and _UTF8_wcrtombin() pick the four byte form with
"wc <= 0x10ffff". wchar_t is signed, so every negative value passes
that test and is encoded from its low bits: wcrtomb() of (wchar_t)-1
returns 4 and writes ff bf bf bf, and printf("%lc", -1) prints those
bytes instead of failing with EILSEQ as it does for 0x110000.
Add "wc >= 0 &&" to both tests, as FreeBSD's utf8.c has.
GitHub-PR: https://github.com/DragonFlyBSD/DragonFlyBSD/pull/57
FreeBSD: https://github.com/freebsd/freebsd-src/commit/8bb93485fb51aac423ec000aa292815cf50bb02c
[CIR][NFC] Add vector of boolean test to __builtin_nondeterministic_value (#219550)
Assisted-by: grok-4.6
Signed-off-by: Letu Ren <fantasquex at gmail.com>
libc: type a positional %F argument in __find_arguments()
When a format uses positional arguments, __find_arguments() walks it
first to learn the type of every argument, and lists the floating
point conversions as a A e E f g G. F is missing, so a double that
is only referred to through %F never gets a type, its slot in the
argument table stays unset, and the conversion reads whatever is
there:
printf("[%1$F]\n", -INFINITY); [0.000000]
printf("[%1$F]\n", 1.5); [0.000000]
printf("[%F]\n", 1.5); [1.500000]
The same format with %1$f, or with any other conversion of the same
argument, works because those give it a type. abseil's str_format
test compares against the C library and caught it.
Add F next to f in both __find_arguments() and __find_warguments().
GitHub-PR: https://github.com/DragonFlyBSD/DragonFlyBSD/pull/56
[orc-rt] Simplify ConnectorRegistry::connect and ogre setup. (#226772)
ConnectorRegistry::connect and ConnectorFn now take the Session and
BootstrapInfo directly, replacing the GetAttachInfo callback and the
AttachInfo struct. The callback let the Session be built lazily, after
the connector had validated its spec, but a connection can fail after
validation anyway, so callers already had to handle discarding a Session
built for a failed connection. Build the Session first, then connect.
ogre's setup is restructured to match: makeSession detects the process
info, builds a thread-pool dispatcher and the Session, adds the host
services, then connects; runOgre waits for the detach. Errors are
reported via Session::logErrors when logging is enabled.
SocketConnectorTest now connects a real Session. Its ownership test
adopts a non-stream socket, which the connector accepts and
createSimpleRemoteCAOverSocket then rejects, rather than relying on a
failing GetAttachInfo.
graphics/pdfium: New port: PDF rendering and manipulation library
PR: 293714
Submitted by: Matías Pizarro <matias at pizarro.net>, geisserml <geisserml at gmail.com> (initial version)
CodeGen: Remove shadowing TargetMachine members from COFF and M68k TLOFs (#226769)
TargetLoweringObjectFile::Initialize already records the TargetMachine
in a base class field.
Co-authored-by: Claude Opus 5 <noreply at anthropic.com>
ARM: Move abi name implied float abi to TargetParser
ARMTargetMachine overrode the default float abi based on the abi name.
Move this logic to TargetParser so the ABI will be computable without
depending on codegen.
Co-Authored-By: Claude Sonnet 5 <noreply at anthropic.com>