Project

General

Profile

Actions

Bug #11770

closed

Fix off-by-one error when choosing a device from MODULE_DEVICE_TABLE

Added by Evgeny Novikov over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
High
Category:
Environment models
Target version:
Start date:
07/21/2022
Due date:
% Done:

0%

Estimated time:
Detected in build:
git
Platform:
Published in build:

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.

Actions #1

Updated by Evgeny Novikov over 1 year ago

  • Description updated (diff)
Actions #2

Updated by Evgeny Novikov over 1 year 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.

Actions #3

Updated by Evgeny Novikov over 1 year 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.

Actions #4

Updated by Evgeny Novikov over 1 year 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.

Actions

Also available in: Atom PDF