Closed Bug 1514782 Opened 7 years ago Closed 6 years ago

error: '__builtin_strncpy' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]

Categories

(Core :: JavaScript Engine, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: Sylvestre, Assigned: Sylvestre)

References

Details

Attachments

(1 file)

``` In file included from /usr/include/string.h:494, from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/system_wrappers/string.h:3, from /root/firefox-gcc-last/js/src/vtune/ittnotify_static.c:71: In function 'strncpy', inlined from '__itt_get_env_var' at /root/firefox-gcc-last/js/src/vtune/ittnotify_static.c:843:17, inlined from '__itt_get_groups' at /root/firefox-gcc-last/js/src/vtune/ittnotify_static.c:982:29: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: '__builtin_strncpy' specified bound depends on the length of the source argument [-Werror=stringop-overflow=] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /root/firefox-gcc-last/js/src/vtune/ittnotify_static.c:59: /root/firefox-gcc-last/js/src/vtune/ittnotify_static.c: In function '__itt_get_groups': /root/firefox-gcc-last/js/src/vtune/ittnotify_config.h:333:35: note: length computed here 333 | #define __itt_fstrnlen(s, l) strlen(s) | ^~~~~~~~~ /root/firefox-gcc-last/js/src/vtune/ittnotify_static.c:838:26: note: in expansion of macro '__itt_fstrnlen' 838 | size_t len = __itt_fstrnlen(env, MAX_ENV_VALUE_SIZE); | ^~~~~~~~~~~~~~ In file included from /usr/include/string.h:494, from /root/firefox-gcc-last/obj-x86_64-pc-linux-gnu/dist/system_wrappers/string.h:3, from /root/firefox-gcc-last/js/src/vtune/ittnotify_static.c:71: In function 'strncpy', inlined from '__itt_get_env_var' at /root/firefox-gcc-last/js/src/vtune/ittnotify_static.c:843:17, inlined from '__itt_get_groups' at /root/firefox-gcc-last/js/src/vtune/ittnotify_static.c:1017:17: /usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:10: error: '__builtin_strncpy' specified bound depends on the length of the source argument [-Werror=stringop-overflow=] 106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /root/firefox-gcc-last/js/src/vtune/ittnotify_static.c:59: /root/firefox-gcc-last/js/src/vtune/ittnotify_static.c: In function '__itt_get_groups': /root/firefox-gcc-last/js/src/vtune/ittnotify_config.h:333:35: note: length computed here 333 | #define __itt_fstrnlen(s, l) strlen(s) | ^~~~~~~~~ /root/firefox-gcc-last/js/src/vtune/ittnotify_static.c:838:26: note: in expansion of macro '__itt_fstrnlen' 838 | size_t len = __itt_fstrnlen(env, MAX_ENV_VALUE_SIZE); | ^~~~~~~~~~~~~~ ```
Priority: -- → P2
I have updated try_server to GCC 9 and also get stringop-overflow warnings at some additional places locations: builds/worker/workspace/build/src/obj-firefox/dist/include/nsCharTraits.h:403:62: error: 'strlen' argument missing terminating nul [-Werror=stringop-overflow=] /builds/worker/workspace/build/src/xpcom/tests/gtest/TestAtoms.cpp:26:45: error: 'strlen' argument missing terminating nul [-Werror=stringop-overflow=] https://treeherder.mozilla.org/#/jobs?repo=try&revision=3f4d4366718bb61867ec852d20309d570c89ba21&selectedJob=219577468
Component: Lint and Formatting → JavaScript Engine
Product: Firefox Build System → Core
Assignee: nobody → sledru
Status: NEW → ASSIGNED
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/846798114648 vtune: Disable a warning on thirdparty code r=froydnj
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: