Skip to content

Conversation

@wqxoxo
Copy link
Contributor

@wqxoxo wqxoxo commented Dec 3, 2025

We had an assert(!(ot->type & OPT_MULTI)) which crashed when using
setconfig on a plugin option marked as both dynamic and multi.

The fix changes plugin_set_dynamic_opt to accept an array of values
(scalar options pass a 1-element array, multi options pass the complete
set). For multi options, setconfig replaces ALL values atomically - an
empty array clears them.

Fixes: #8295

Changelog-Fixed: setconfig no longer crashes on dynamic multi-value plugin options

@wqxoxo wqxoxo force-pushed the fix/8295-setconfig-multi-options branch from cc79c7b to 593a3ae Compare December 3, 2025 15:53
@wqxoxo wqxoxo marked this pull request as ready for review December 3, 2025 15:55
@wqxoxo wqxoxo requested a review from cdecker as a code owner December 3, 2025 15:55
@wqxoxo wqxoxo force-pushed the fix/8295-setconfig-multi-options branch 3 times, most recently from e107f91 to 6d23f9b Compare December 10, 2025 08:34
We had an assert(!(ot->type & OPT_MULTI)) which crashed when using
setconfig on a plugin option marked as both dynamic and multi.

The fix changes plugin_set_dynamic_opt to accept an array of values
(scalar options pass a 1-element array, multi options pass the complete
set). For multi options, setconfig replaces ALL values atomically - an
empty array clears them.

Fixes: ElementsProject#8295

Changelog-Fixed: setconfig no longer crashes on dynamic multi-value plugin options
@wqxoxo wqxoxo force-pushed the fix/8295-setconfig-multi-options branch from 6d23f9b to bbab2e3 Compare December 10, 2025 08:44
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.

setconfig causes crash on dynamic multi options

1 participant