Skip to content

Reject unsupported processor oversampling factors - #1215

Open
jiri-god wants to merge 1 commit into
kushview:mainfrom
jiri-god:fix/oversampling-input-validation
Open

jiri-god wants to merge 1 commit into
kushview:mainfrom
jiri-god:fix/oversampling-input-validation

Conversation

@jiri-god

@jiri-god jiri-god commented Oct 30, 2026 •

Copy link
Copy Markdown

Processor::setOversamplingFactor() previously converted log2f(osFactor) to an integer before validating the argument. Zero and negative values produce a non-finite result; unsupported positive values could silently select another factor or disable an existing chain.

Accept only the supported factors 1, 2, 4 and 8, computing their exponents without floating-point conversion. Invalid requests leave the current processor state unchanged. Session-loader normalization is unchanged.

Validation on Apple Silicon macOS (RelWithDebInfo): all 58 CTest suites pass. The new OversamplerTests case checks valid transitions and rejects zero, negative values, non-powers of two, factors above the supported maximum and integer extremes, preserving the factor, latency and enabled state. It fails against unchanged upstream main. This is an API boundary regression, not a claim of a reproduced crash through the normal UI.

Independent host-only change based on d0226686; no private extensions.

Integration check: combined with #1211–#1214 and #1216, all 63 CTest suites pass (3.63 s). There is a textual overlap with #1212, which extracts applyOversamplingFactor(); in that combination the validation belongs in the extracted apply method.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@jiri-god

jiri-god commented Oct 30, 2026 via email

Copy link
Copy Markdown
Author

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.

2 participants