Bug #11770
closedFix off-by-one error when choosing a device from MODULE_DEVICE_TABLE
0%
Description
Originally implemented choice of a device from the MODULE_DEVICE_TABLE array suffers from the off-by-one error. It is not necessary to select the latest element from the array that corresponds to the terminator ("{}"). Otherwise, there are NULL pointer dereferences and so on. This bug was not fixed by #11007 that only changed the API and its implementation for the random choice so that SMG became to understand it better.
There are several dozens false alarms from several hundreds of warnings for Linux kernel drivers, so the issue is quite considerable.
Updated by Evgeny Novikov over 2 years ago
- Status changed from New to Resolved
I fixed the issue in branch mod-dev-table-OBOB. Let's see on CI testing results. Then I will evaluate them on a large subset of Linux kernel drivers.
Updated by Evgeny Novikov over 2 years ago
CI tests almost passed, except for in one case the target bug is not detected anymore since the target code is not reachable with the valid environment model. Let's see on changes for a subset of Linux kernel drivers.
Updated by Evgeny Novikov over 2 years ago
- Status changed from Resolved to Closed
Verification of the subset of Linux kernel drivers demonstrated only positive regressions from the first glance. Corresponding false alarms are not reported anymore and in some cases verification tasks become simpler, so there are safes instead of timeouts. I merged the branch to master in ebc5c2f56.