From cce41f3a6b78358221c5789249a7db03c2e98a50 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Wed, 6 Sep 2023 23:16:29 -0700 Subject: modules/flow: fix elements overflow bug s->count isn't always perfectly divisable by n_cpus, which is why ctxt->n_elements is computed from n_cpus * elements_per_cpu in the transition to threaded rendering for flow. That's all fine and dandy, but the ctxt->elements initialization loop was still using the vestigial s->count from the pre-threaded implementation. So on core counts where ctxt->n_elements was smaller than s->count, initialization scribbled. Thanks Sketch for assistance in chasing this down w/ASAN enabled on a box that exhibited crashing w/rtv,channels=flow. --- src/modules/flow/ff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/flow/ff.c') diff --git a/src/modules/flow/ff.c b/src/modules/flow/ff.c index f4280b9..98ac597 100644 --- a/src/modules/flow/ff.c +++ b/src/modules/flow/ff.c @@ -41,7 +41,7 @@ ff_t * ff_free(ff_t *ff) ff_t * ff_new(unsigned size, void (*populator)(void *context, unsigned size, const ff_data_t *other, ff_data_t *field), void *context) { - ff_t *ff; + ff_t *ff; ff = calloc(1, sizeof(ff_t)); if (!ff) -- cgit v1.2.3