ROCm / MIVisionX

MIVisionX toolkit is a set of comprehensive computer vision and machine intelligence libraries, utilities, and applications bundled into a single toolkit. AMD MIVisionX also delivers a highly optimized open-source implementation of the Khronos OpenVX™ and OpenVX™ Extensions.
https://rocm.docs.amd.com/projects/MIVisionX/en/latest/
MIT License
186 stars 73 forks source link

VX RPP - Ubuntu 20.04 Warnings #420

Closed kiritigowda closed 3 years ago

kiritigowda commented 3 years ago
kiritigowda commented 3 years ago

@shobana-mcw & @r-abishekmcw - can you look into this issue.

shobana-mcw commented 3 years ago

We will look into it.

kiritigowda commented 3 years ago

We will look into it.

@shobana-mcw any update on this?

shobana-mcw commented 3 years ago

@kiritigowda We have figured out the issue. We are creating a PR this week and will include these changes too.

kiritigowda commented 3 years ago

Latest Warnings with C & CXX compiler GNU 9.3.0

/MIVisionX/amd_openvx/openvx/ago/ago_haf_gpu_special_filters.cpp: In function 'int HafGpu_SobelSpecialCases(_vx_node*)':
/MIVisionX/amd_openvx/openvx/ago/ago_haf_gpu_special_filters.cpp:686:33: warning: '_GXY' directive writing 4 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
  686 |   sprintf(node->opencl_name, "%s_GXY", opencl_name);
      |                                 ^~~~
In file included from /usr/include/stdio.h:867,
                 from /MIVisionX/amd_openvx/openvx/ago/ago_platform.h:37,
                 from /MIVisionX/amd_openvx/openvx/ago/ago_internal.h:27,
                 from /MIVisionX/amd_openvx/openvx/ago/ago_haf_gpu.h:27,
                 from /MIVisionX/amd_openvx/openvx/ago/ago_haf_gpu_special_filters.cpp:24:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: '__builtin___sprintf_chk' output between 5 and 260 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/MIVisionX/amd_openvx/openvx/ago/ago_haf_gpu_special_filters.cpp: In function 'int HafGpu_CannySobelFilters(_vx_node*)':
/MIVisionX/amd_openvx/openvx/ago/ago_haf_gpu_special_filters.cpp:803:32: warning: '_GXY' directive writing 4 bytes into a region of size between 1 and 256 [-Wformat-overflow=]
  803 |  sprintf(node->opencl_name, "%s_GXY", opencl_name);
      |                                ^~~~
In file included from /usr/include/stdio.h:867,
                 from /MIVisionX/amd_openvx/openvx/ago/ago_platform.h:37,
                 from /MIVisionX/amd_openvx/openvx/ago/ago_internal.h:27,
                 from /MIVisionX/amd_openvx/openvx/ago/ago_haf_gpu.h:27,
                 from /MIVisionX/amd_openvx/openvx/ago/ago_haf_gpu_special_filters.cpp:24:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: '__builtin___sprintf_chk' output between 5 and 260 bytes into a destination of size 256
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/MIVisionX/amd_openvx/openvx/api/vx_api.cpp: In function '_vx_object_array* vxCreateObjectArray(vx_context, vx_reference, vx_size)':
/MIVisionX/amd_openvx/openvx/api/vx_api.cpp:8246:63: warning: '%s' directive writing up to 511 bytes into a region of size between 478 and 497 [-Wformat-overflow=]
 8246 |   char desc[512]; sprintf(desc, "objectarray:" VX_FMT_SIZE ",[%s]", count, desc_exemplar);
      |                                                               ^~           ~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from /MIVisionX/amd_openvx/openvx/ago/ago_platform.h:37,
                 from /MIVisionX/amd_openvx/openvx/ago/ago_internal.h:27,
                 from /MIVisionX/amd_openvx/openvx/api/vx_api.cpp:24:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: '__builtin___sprintf_chk' output between 17 and 547 bytes into a destination of size 512
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/MIVisionX/amd_openvx/openvx/api/vx_api.cpp: In function '_vx_object_array* vxCreateVirtualObjectArray(vx_graph, vx_reference, vx_size)':
/MIVisionX/amd_openvx/openvx/api/vx_api.cpp:8459:63: warning: '%s' directive writing up to 511 bytes into a region of size between 478 and 497 [-Wformat-overflow=]
 8459 |   char desc[512]; sprintf(desc, "objectarray:" VX_FMT_SIZE ",[%s]", count, desc_exemplar);
      |                                                               ^~           ~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from /MIVisionX/amd_openvx/openvx/ago/ago_platform.h:37,
                 from /MIVisionX/amd_openvx/openvx/ago/ago_internal.h:27,
                 from /MIVisionX/amd_openvx/openvx/api/vx_api.cpp:24:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:34: note: '__builtin___sprintf_chk' output between 17 and 547 bytes into a destination of size 512
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In file included from /usr/include/string.h:495,
                 from /MIVisionX/amd_openvx_extensions/amd_nn/src/kernels.h:43,
                 from /MIVisionX/amd_openvx_extensions/amd_nn/src/kernels.cpp:23:
In function 'char* strncpy(char*, const char*, size_t)',
    inlined from 'int getEnvironmentVariable(const char*, char*, size_t)' at /MIVisionX/amd_openvx_extensions/amd_nn/src/kernels.cpp:92:16:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: warning: 'char* __builtin_strncpy(char*, const char*, long unsigned int)' specified bound depends on the length of the source argument [-Wstringop-overflow=]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/MIVisionX/amd_openvx_extensions/amd_nn/src/kernels.cpp: In function 'int getEnvironmentVariable(const char*, char*, size_t)':
/MIVisionX/amd_openvx_extensions/amd_nn/src/kernels.cpp:92:36: note: length computed here
   92 |         strncpy(value, text, strlen(text)+1);
      |                              ~~~~~~^~~~~~

In file included from /usr/include/string.h:495,
                 from /MIVisionX/amd_openvx_extensions/amd_loomsl/kernels/kernels.h:46,
                 from /MIVisionX/amd_openvx_extensions/amd_loomsl/live_stitch_api.cpp:24:
In function 'char* strncpy(char*, const char*, size_t)',
    inlined from 'vx_status lsExportConfiguration(ls_context, const char*, const char*)' at /MIVisionX/amd_openvx_extensions/amd_loomsl/live_stitch_api.cpp:3576:54:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: warning: 'char* __builtin___strncpy_chk(char*, const char*, long unsigned int, long unsigned int)' specified bound depends on the length of the source argument [-Wstringop-overflow=]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/MIVisionX/amd_openvx_extensions/amd_loomsl/live_stitch_api.cpp: In function 'vx_status lsExportConfiguration(ls_context, const char*, const char*)':
/MIVisionX/amd_openvx_extensions/amd_loomsl/live_stitch_api.cpp:3576:96: note: length computed here
 3576 |   char fileNamePrefixForTables[1024] = { 0 }; strncpy(fileNamePrefixForTables, fileName, strlen(fileName) - 4);
      |                                                                                          ~~~~~~^~~~~~~~~~
kiritigowda commented 3 years ago

VX RPPP issues fixed on TOT, warnings captured on #458