Skip to content

Housekeeping: Add Some Memory Safety Clamps - #1182

Merged
mfisher31 merged 6 commits into
mainfrom
housekeeping-memory-clamps
Sep 8, 2026
Merged

Housekeeping: Add Some Memory Safety Clamps#1182
mfisher31 merged 6 commits into
mainfrom
housekeeping-memory-clamps

Conversation

@mfisher31

Copy link
Copy Markdown
Member

No description provided.

mfisher31 and others added 6 commits September 8, 2026 16:47
Plugin-reported latency and delay compensation size the per-channel delay
buffers in the graph builder with no upper bound, so a bogus value could
allocate gigabytes per connection. Clamp both to Processor::maxLatencySamples
and log the node when that happens.

Delay compensation restored from a session was converted to samples before
the node was prepared, with a sample rate of zero, and never recomputed.
Recompute it in prepare().

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The rendering buffers were fixed at 4096 samples, so any device or host
block larger than that wrote past the end of each channel.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ConfigFor

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Formats were registered in prepareToPlay, but plugin state is now restored
before the node is prepared, so the saved file could not be opened and was
silently dropped on session load.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Blocks are buffered to an image and carry a shadow effect, so a custom size
read from a session with no upper bound could allocate two enormous bitmaps.
Clamp to 8192 x 8192.

The async embed message held a reference to the block and one of its
members; use a SafePointer so a block deleted before delivery is skipped.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mfisher31
mfisher31 merged commit ea98be8 into main Sep 8, 2026
5 checks passed
@mfisher31
mfisher31 deleted the housekeeping-memory-clamps branch September 9, 2026 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant