Project

General

Profile

Actions

Bug #9393

closed

Problem with memleak visualization on absent return from void function

Added by Anton Vasilyev about 6 years ago. Updated almost 5 years ago.

Status:
Rejected
Priority:
Urgent
Assignee:
-
Category:
Results processing
Target version:
Start date:
11/20/2018
Due date:
% Done:

0%

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

Description

For void functions with absent return:

/*
 * Use the Fisher-Yates shuffle algorithm on an array of lines.
 */
static void shuffle_lines(char **lines, unsigned numlines)
{
    unsigned i;
    unsigned r;
    char *tmp;

    srand(monotonic_us());

    for (i = numlines-1; i > 0; i--) {
        r = rand();
        /* RAND_MAX can be as small as 32767 */
        if (i > RAND_MAX)
            r ^= rand() << 15;
        r %= i + 1;
        tmp = lines[i];
        lines[i] = lines[r];
        lines[r] = tmp;
    }
}

SMG generates warning edge without source code like:

 <edge source="A85098" target="A85104">
   <data key="returnFrom">shuffle_lines</data>
   <data key="warning">Memory leak is detected</data>
 </edge>

Require to specify Klever and SMG interaction for this corner case.

Actions #1

Updated by Ilja Zakharov about 6 years ago

  • Category set to Results processing
  • Assignee set to Ilja Zakharov
  • Priority changed from Normal to Urgent
  • Target version set to 3.0
Actions #2

Updated by Evgeny Novikov over 5 years ago

  • Blocked by Feature #8494: Process extended format of violation witnesses added
Actions #3

Updated by Evgeny Novikov about 5 years ago

  • Assignee changed from Ilja Zakharov to Evgeny Novikov

I will see on this.

Actions #4

Updated by Evgeny Novikov almost 5 years ago

  • Blocked by deleted (Feature #8494: Process extended format of violation witnesses)
Actions #5

Updated by Evgeny Novikov almost 5 years ago

  • Status changed from New to Rejected
  • Assignee deleted (Evgeny Novikov)

I reject this issue since Klever does not rely upon tag "sourcecode" anymore. If there still will be any problems, please, open corresponding issues.

Actions

Also available in: Atom PDF