wrappers: always hand the effect zero-filled channels (never null)#142
Open
jcelerier wants to merge 1 commit into
Open
wrappers: always hand the effect zero-filled channels (never null)#142jcelerier wants to merge 1 commit into
jcelerier wants to merge 1 commit into
Conversation
The process adapters (process/ and process_bus/, per-channel and poly) already had storage to point missing channels at silent scratch buffers, but it was gated behind a commented-out AVND_ENABLE_SAFE_BUFFER_STORAGE, so by default a host supplying fewer channels than the object declares left bus.channel = nullptr -- any effect that dereferences its channel then crashes. That null path is a core-invariant violation: an effect must always receive valid, zero-filled channel buffers. Enable the safe buffer storage by default (opt out with -DAVND_ENABLE_SAFE_BUFFER_STORAGE=0). process_bus/base.hpp includes process/base.hpp, so this one definition covers every backend. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011s7huWR2wFsLFiMJPjx1z2
This was referenced Jul 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extracted from the
avendish-uibranch so it can land independently (it is unrelated to the UI work it was riding on).The process adapters (
process/andprocess_bus/, per-channel and poly) already had storage to point missing channels at silent scratch buffers, but it was gated behind a commented-outAVND_ENABLE_SAFE_BUFFER_STORAGE. By default, a host supplying fewer channels than the object declares leftbus.channel = nullptr— any effect that dereferences its channel then crashes. An effect must always receive valid, zero-filled channel buffers.This enables the safe buffer storage by default; opt out with
-DAVND_ENABLE_SAFE_BUFFER_STORAGE=0.process_bus/base.hppincludesprocess/base.hpp, so one definition covers every backend.Verified: full build (examples across enabled backends) + the 100-test suite passing with clang-cl on Windows.
🤖 Generated with Claude Code
https://claude.ai/code/session_014Zm2k4dsLp2jMa47zyLcSZ