Bug ID 1727
Summary arparse LTO warnings
Product DPDK
Version unspecified
Hardware All
OS All
Status UNCONFIRMED
Severity normal
Priority Normal
Component other
Assignee dev@dpdk.org
Reporter stephen@networkplumber.org
Target Milestone ---

Enabling LTO detects more warnings in argparse test.
Looks like argparse is referencing invalid arguments before checking.

n function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_basic_param’ at
../app/test/test_argparse.c:118:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_basic_param’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_basic_param’ at
../app/test/test_argparse.c:123:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_basic_param’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_arg_name’ at
../app/test/test_argparse.c:137:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_arg_name’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_arg_name’ at
../app/test/test_argparse.c:142:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_arg_name’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_arg_name’ at
../app/test/test_argparse.c:147:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_arg_name’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_arg_name’ at
../app/test/test_argparse.c:152:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_arg_name’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_arg_name’ at
../app/test/test_argparse.c:158:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_arg_name’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_arg_name’ at
../app/test/test_argparse.c:163:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_arg_name’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_arg_name’ at
../app/test/test_argparse.c:168:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_arg_name’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_arg_help’ at
../app/test/test_argparse.c:182:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_arg_help’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_has_val’ at
../app/test/test_argparse.c:203:9:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_has_val’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_arg_saver’ at
../app/test/test_argparse.c:221:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_arg_saver’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_arg_saver’ at
../app/test/test_argparse.c:229:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_arg_saver’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_arg_saver’ at
../app/test/test_argparse.c:237:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_arg_saver’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_arg_saver’ at
../app/test/test_argparse.c:245:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_arg_saver’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_arg_flags’ at
../app/test/test_argparse.c:263:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_arg_flags’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_arg_flags’ at
../app/test/test_argparse.c:269:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_arg_flags’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_arg_flags’ at
../app/test/test_argparse.c:281:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_arg_flags’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_arg_repeat’ at
../app/test/test_argparse.c:296:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_arg_repeat’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_arg_repeat’ at
../app/test/test_argparse.c:302:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_arg_repeat’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_option’ at
../app/test/test_argparse.c:317:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_option’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_invalid_option’ at
../app/test/test_argparse.c:323:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function ‘test_argparse_invalid_option’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_opt_autosave_parse_int_of_no_val’ at
../app/test/test_argparse.c:340:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function
‘test_argparse_opt_autosave_parse_int_of_no_val’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_opt_autosave_parse_int_of_required_val’ at
../app/test/test_argparse.c:373:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function
‘test_argparse_opt_autosave_parse_int_of_required_val’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_opt_autosave_parse_int_of_optional_val’ at
../app/test/test_argparse.c:417:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function
‘test_argparse_opt_autosave_parse_int_of_optional_val’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_opt_callback_parse_int_of_no_val’ at
../app/test/test_argparse.c:490:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function
‘test_argparse_opt_callback_parse_int_of_no_val’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_opt_callback_parse_int_of_required_val’ at
../app/test/test_argparse.c:541:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function
‘test_argparse_opt_callback_parse_int_of_required_val’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_opt_callback_parse_int_of_optional_val’ at
../app/test/test_argparse.c:605:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function
‘test_argparse_opt_callback_parse_int_of_optional_val’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_pos_autosave_parse_int’ at
../app/test/test_argparse.c:659:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function
‘test_argparse_pos_autosave_parse_int’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |                                    ^
In function ‘test_argparse_copy’,
    inlined from ‘test_argparse_init_obj’ at ../app/test/test_argparse.c:108:2,
    inlined from ‘test_argparse_pos_callback_parse_int’ at
../app/test/test_argparse.c:721:8:
../app/test/test_argparse.c:96:17: warning: ‘memcpy’ writing 56 bytes into a
region of size 0 overflows the destination [-Wstringop-overflow=]
   96 |                 memcpy(&dst->args[i], &src->args[i],
sizeof(src->args[i]));
      |                 ^
../app/test/test_argparse.c: In function
‘test_argparse_pos_callback_parse_int’:
../app/test/test_argparse.c:106:36: note: at offset 184 into destination object
‘obj’ of size 184
  106 |         static struct rte_argparse obj = argparse_templater();
      |
          


You are receiving this mail because: