You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/11/23 20:35:57 UTC

[GitHub] [incubator-tvm] tom-gall opened a new issue #6960: strncpy in TVMAPISetLastError needs to make sure that the copied string is less then the size of the destination

tom-gall opened a new issue #6960:
URL: https://github.com/apache/incubator-tvm/issues/6960


   When building the micro tvm runtime with Zephyr
   
   Including boilerplate (Zephyr base): /lkft/tgall/zephyrproject/zephyr/cmake/app/boilerplate.cmake
   In file included from /home/tgall/zephyr-sdk-0.11.3/arm-zephyr-eabi/arm-zephyr-eabi/sys-include/string.h:180,
                    from /home/tgall/tvm/tvm/src/runtime/crt/common/crt_runtime_api.c:27:
   /home/tgall/tvm/tvm/src/runtime/crt/common/crt_runtime_api.c: In function 'TVMAPISetLastError':
   /home/tgall/tvm/tvm/src/runtime/crt/common/crt_runtime_api.c:41:44: error: '__builtin_strncpy' specified bound 1024 equals destination size [-Werror=stringop-truncation]
      41 | void TVMAPISetLastError(const char* msg) { strncpy(g_last_error, msg, sizeof(g_last_error)); }
         |                                            ^~~~~~~
   cc1: all warnings being treated as errors
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-tvm] tom-gall commented on issue #6960: strncpy in TVMAPISetLastError needs to make sure that the copied string is less then the size of the destination

Posted by GitBox <gi...@apache.org>.
tom-gall commented on issue #6960:
URL: https://github.com/apache/incubator-tvm/issues/6960#issuecomment-732414013


   @areusch - minor bug 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org