Skip to content

M0-2-1: Consider expanding to inter-procedural overlapping analysis #120

Open
@lcartey

Description

@lcartey

Affected rules

  • M0-2-1

Description

The query currently identifies objects using an intra-procedural technique - we only check for equivalence of objects within the same function. We should consider expanding to support analysis across functions.

Example

struct s1 {
  int m1[10];
};
struct s2 {
  int m1;
  struct s1 m2;
};

union u {
  struct s1 m1;
  struct s2 m2;
};

void overlapping_access(u u1, u u2) {
  u1.m2.m2 = u2.m1; // NON_COMPLIANT when called from test
}

void test() {
 u1 u;
 overlapping_access(u, u)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty-MediumA false positive or false negative report which is expected to take 1-5 days effort to addressImpact-LowStandard-AUTOSARfalse positive/false negativeAn issue related to observed false positives or false negatives.

    Type

    No type

    Projects

    Status

    Triaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions