Open nathanchance opened 6 months ago
FWIW, I cannot reproduce this with GCC. The offending call is in dlh_trigger_handler()
:
memcpy(tmp_buf + i,
&st->rx_buf[1] + chn * DLH_NUM_DATA_BYTES,
DLH_NUM_DATA_BYTES);
I'm checking how the fortify split could have possibly triggered this...
This, again, appears to be a loop unrolling issue. :(
However, the iio code is also making a lot of assumptions. I've sent an RFC: https://lore.kernel.org/lkml/20240222222335.work.759-kees@kernel.org
After commit 0f4459080884 ("fortify: Split reporting and avoid passing string pointer") in -next, I see a new fortify warning in
drivers/iio/pressure/dlhl60d.c
with a couple of distribution configurations (such as OpenSUSE's):This happens with LLVM 18, so this does not appear to be any changed compiler behavior (but I did not check older releases).
I have done no further investigation to see if this warning is legitimate or not.