Skip to content

Commit 95ab8cc

Browse files
committed
CPP: Add a test of More64BitWaste.ql.
1 parent 5e32890 commit 95ab8cc

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
| test.cpp:17:8:17:12 | test4 | test4 includes 0 bits of padding on ILP32, but 32 bits on LP64. |
2+
| test.cpp:29:8:29:12 | test6 | test6 includes 0 bits of padding on ILP32, but 32 bits on LP64. |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Likely Bugs/Memory Management/Padding/More64BitWaste.ql
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
struct test1
3+
{
4+
int x;
5+
};
6+
7+
struct test2
8+
{
9+
int x, y;
10+
};
11+
12+
struct test3
13+
{
14+
int x, y, z;
15+
};
16+
17+
struct test4 // BAD
18+
{
19+
int a;
20+
long long b;
21+
};
22+
23+
struct test5
24+
{
25+
long long a;
26+
int b;
27+
};
28+
29+
struct test6 // BAD
30+
{
31+
char as[4];
32+
long long b;
33+
};
34+
35+
struct test7
36+
{
37+
char as[8];
38+
long long b;
39+
};

0 commit comments

Comments
 (0)