mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
CPP: Add a test of More64BitWaste.ql.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
| test.cpp:17:8:17:12 | test4 | test4 includes 0 bits of padding on ILP32, but 32 bits on LP64. |
|
||||
| test.cpp:29:8:29:12 | test6 | test6 includes 0 bits of padding on ILP32, but 32 bits on LP64. |
|
||||
@@ -0,0 +1 @@
|
||||
Likely Bugs/Memory Management/Padding/More64BitWaste.ql
|
||||
@@ -0,0 +1,39 @@
|
||||
|
||||
struct test1
|
||||
{
|
||||
int x;
|
||||
};
|
||||
|
||||
struct test2
|
||||
{
|
||||
int x, y;
|
||||
};
|
||||
|
||||
struct test3
|
||||
{
|
||||
int x, y, z;
|
||||
};
|
||||
|
||||
struct test4 // BAD
|
||||
{
|
||||
int a;
|
||||
long long b;
|
||||
};
|
||||
|
||||
struct test5
|
||||
{
|
||||
long long a;
|
||||
int b;
|
||||
};
|
||||
|
||||
struct test6 // BAD
|
||||
{
|
||||
char as[4];
|
||||
long long b;
|
||||
};
|
||||
|
||||
struct test7
|
||||
{
|
||||
char as[8];
|
||||
long long b;
|
||||
};
|
||||
Reference in New Issue
Block a user