[NFC][clang] Adjust PPMemoryAllocationsTest threshold for ASan (#209024)
PPMemoryAllocationsTest.PPMacroDefinesAllocations measures the memory
footprint of the preprocessor allocator and asserts a strict threshold
of 130.0 bytes per define.
When built with ASan, the allocator adds redzones to allocations,
which increases the total memory reported by `getTotalMemory()` and
causes the test to fail (reporting ~136.8 bytes per define).
Adjust the threshold to 145.0 bytes per define when built with ASan
(detected via `LLVM_ADDRESS_SANITIZER_BUILD`) to account for this
overhead while maintaining the strict limit for standard builds.
Assisted-by: Gemini
rockchip: fix stack overflow in rk8xx_rtc
Presumably surfaced by -fstack-protector-strong, rk8xx_settime was
triggering SSP when ntpd set the time on the RockPro64, at the very
least. A minor oops meant that the weeks mask was getting tossed into
the wrong field, and the mask was never populated. The mask is 0x7 for
all three of these, thus overflowing the `data` array in settime by one
byte.
PR: 296719
Reported by: jsm, "Tenkawa" on Discord
Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D58182
Add a few missed files to ObsoleteFiles.inc
There were still some left-over files under usr/tests/gnu/usr.bin/diff,
causing the directory to not be fully removed. Add these to OLD_FILES.
Fixes: 134a4c78d070
[orc-rt] Add internal secureGetenv utility and use it in the printf b… (#209014)
…ackend
orc_rt::secureGetenv is like getenv, but returns null when the process
is running with elevated privileges (e.g. a set-user-ID or set-group-ID
program), so that a variable in an attacker-controlled environment
cannot influence a privileged host. On libcs where privilege can't be
checked (anything other than glibc or the BSDs/macOS), it fails secure
and returns null, so those environment variables are ignored until a
branch for the platform is added.
Switch the printf logging backend to read ORC_RT_LOG and
ORC_RT_LOG_OUTPUT through secureGetenv, so a redirected log file or
level can't be forced via the environment in a privileged process.
Note that running the ORC runtime in a process with elevated privileges
is extremely risky (since the JIT'd code will typically inherit these
elevated privileges), and expected to be rare. Exercise extreme caution
with such setups.
games/trx: New port: Open source re-implementation of Tomb Raider I, II and III
An open-source reimplementation of Tomb Raider 1, Tomb Raider 2 and Tomb
Raider 3. TRX aims to enhance these classic games through decompilation
and the implementation of open-source alternatives to proprietary components.
TRX is a single engine capable of running TR1, TR2, TR3, and custom levels
respecting each of the distinct, classic engines' mechanics.
WWW: https://github.com/LostArtefacts/TRX
[LLDB] Fix use-after-free destroying a Binder from its OnClosed handler
transport::Binder::OnClosed() holds m_mutex (a recursive_mutex) while
invoking m_disconnect_handler. In the MCP server, that handler removes
the disconnected client, which owns the transport and therefore the
Binder itself. As a result, the Binder -- and its m_mutex -- are
destroyed while the scoped_lock in OnClosed still holds the lock.
This is a use-after-free everywhere, as the lock guard later unlocks
freed memory.
Move the disconnect handler out of the critical section and release the
lock before invoking it, so the Binder can be safely destroyed without
holding or destroying a locked mutex.