Skip to content

Undefined behaviour in FC backward kernel with `nobias`

bad418eb introduced an UB in FC backward kernel : when nobias option is set, we are attempting to use std::fill on a nullptr.

if (biasesGrad == nullptr) { // no bias
        std::fill(biasesGrad, biasesGrad + outputFeatureSize, B(0));
    } else {

File: https://gitlab.eclipse.org/eclipse/aidge/aidge_backend_cpu/-/blob/dev/include/aidge/backend/cpu/operator/FCImpl_kernels.hpp

Edited by Jerome Hue