smatch, __builtin_unreachable() and uninitialized var...
Toomas Soome <[email protected]> Mon, 17 Nov 2025 11:50:42 +0200
| Newsgroups | org.kernel.vger.smatch |
|---|---|
| Message-ID | <[email protected]> |
hi! While using smatch with OpenZFS code, we have stepped on this issue: /home/runner/work/zfs/zfs/zfs/module/icp/algs/aes/aes_modes.c:90 = aes_encrypt_contiguous_blocks() error: uninitialized symbol 'rv'. The function is using conditional call to function, which return value = is stored to rv and the =E2=80=9Cimpossible=E2=80=9D else leg is marked = with __builtin_unreachable() as seen there: = https://github.com/openzfs/zfs/blob/master/module/icp/algs/aes/aes_modes.c= #L77 it would be nice if smatch could use __builtin_unreachable() there to = avoid this error=E2=80=A6 thanks, toomas