feat: port aelrynth 2026.9.27.2 snapshot onto GitHub history

Overlay upstream/main (9b5e276) onto BlankenshipG main without rewriting
history. Keep origin-only Decal/plugin/docs trees. Re-apply aelrynth.com
and sibling-fork URL fixes that aelrynth git still has as tombohar links.

Co-authored-by: BlankenshipG <BlankenshipG@users.noreply.github.com>
This commit is contained in:
Cursor Agent 2026-10-04 15:43:50 +00:00
commit 4ddbb52eb2
No known key found for this signature in database
244 changed files with 59710 additions and 3067 deletions

View file

@ -29,11 +29,23 @@ internal static class RawOpcodeTracker
public static bool ShowKnown = false;
public static bool ShowUnknown = true;
// Deep-audit finding #25 (2026-06-18): Track allocates a fresh byte[] for
// every non-zero-opcode blob of every inbound packet, called from
// RecvFromDetour (a reverse-P/Invoke detour) with no gate on whether the
// Packet Sniffer panel is even open — only Frozen. Sustained per-packet
// managed allocation on a reverse-P/Invoke transition is the documented
// RhpReversePInvokeAttachOrTrapThread2 fail-fast hazard; on a busy
// multibox it's constant GC churn for a diagnostic feature nobody is
// looking at. RynthCoreShell sets this to the panel's actual visibility
// every frame (open OR closed) — Track short-circuits before any
// allocation while it's false, which is the overwhelming common case.
public static volatile bool Active;
public static bool IsKnown(ushort opcode) => KnownOpcodes.Contains(opcode);
public static unsafe void Track(ushort opcode, byte* payload, int payloadLen)
{
if (Frozen) return;
if (Frozen || !Active) return;
int sampleLen = payloadLen < 16 ? payloadLen : 16;
byte[] sample = new byte[sampleLen];