Project

General

Profile

Actions

Feature #7481

open

Try to use memory allocating function models by default

Added by Evgeny Novikov over 7 years ago. Updated over 6 years ago.

Status:
New
Priority:
High
Category:
Requirement specifications
Target version:
-
Start date:
08/17/2016
Due date:
% Done:

0%

Estimated time:
Published in build:

Description

After EMG and CPAchecker became very accurate regarding tracking memory (#7465 and #7454) we need to model as much memory allocating functions as possible. Good news is that the most of them already have models since we have the rule specification for checking common memory leaks. Unfortunately some such functions haven't models. For instance, spi_alloc_master() is such the function. Due to this we lose one target bug (c822fb57ba12~/drivers/spi/spi-pxa2xx-platform.ko/linux:clk1).


Related issues 2 (1 open1 closed)

Related to Klever - Feature #7516: Try to generate models for allocation functions automaticallyNew08/19/2016

Actions
Related to Klever - Bug #7670: Instrumentation of memory allocation functions from driver code should correctly pass size of memoryClosedAnton Vasilyev11/01/2016

Actions
Actions #1

Updated by Alexey Khoroshilov over 7 years ago

Do we have a ticket to generate models for allocation functions automatically as kernel core models?

Actions #2

Updated by Evgeny Novikov over 7 years ago

  • Priority changed from Urgent to High

In c5ded90 I at last added model for spi_alloc_master(). After that both both before and after the target bug fix I got timeouts.

Let's discover and experiment with this issue one day later.

Actions #3

Updated by Evgeny Novikov over 7 years ago

  • Priority changed from High to Urgent

I will continue this work since it is very required for several properties to be verified without many false alarms.

Actions #4

Updated by Evgeny Novikov about 7 years ago

We need to also add model for devm_kzalloc() since its absence causes false alarms for different rules.

Actions #5

Updated by Evgeny Novikov about 7 years ago

Evgeny Novikov wrote:

We need to also add model for devm_kzalloc() since its absence causes false alarms for different rules.

Actually Anton already did that for generic:memory, so it seems that we just need to get his models and use them for all rules by default.

Actions #6

Updated by Evgeny Novikov over 6 years ago

  • Priority changed from Urgent to High

Let's fix and improve specifications after we will have good tests and a testing infrastructure (version:0.3) and likely after we will complete a considerable refactoring of Core (1.0).

Actions

Also available in: Atom PDF