Open
Description
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
Labels
Type
Projects
Status
Triaged