Closed Bug 1711831 Opened 3 years ago Closed 3 years ago

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

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

[task 2021-05-19T04:07:57.124Z] 04:07:57     INFO -  In file included from /builds/worker/fetches/sysroot/usr/include/string.h:640,
[task 2021-05-19T04:07:57.124Z] 04:07:57     INFO -                   from /builds/worker/workspace/obj-build/dist/system_wrappers/string.h:3,
[task 2021-05-19T04:07:57.125Z] 04:07:57     INFO -                   from /builds/worker/checkouts/gecko/js/src/vtune/ittnotify_static.c:71:
[task 2021-05-19T04:07:57.125Z] 04:07:57     INFO -  In function 'strncpy',
[task 2021-05-19T04:07:57.125Z] 04:07:57     INFO -      inlined from '__itt_get_env_var' at /builds/worker/checkouts/gecko/js/src/vtune/ittnotify_static.c:843:17,
[task 2021-05-19T04:07:57.125Z] 04:07:57     INFO -      inlined from '__itt_get_groups' at /builds/worker/checkouts/gecko/js/src/vtune/ittnotify_static.c:1017:17:
[task 2021-05-19T04:07:57.126Z] 04:07:57    ERROR -  /builds/worker/fetches/sysroot/usr/include/x86_64-linux-gnu/bits/string3.h:120:10: error: '__builtin_strncpy' specified bound depends on the length of the source argument [-Werror=stringop-truncation]
[task 2021-05-19T04:07:57.126Z] 04:07:57     INFO -    120 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
[task 2021-05-19T04:07:57.129Z] 04:07:57     INFO -        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2021-05-19T04:07:57.129Z] 04:07:57     INFO -  In file included from /builds/worker/checkouts/gecko/js/src/vtune/ittnotify_static.c:59:
[task 2021-05-19T04:07:57.129Z] 04:07:57     INFO -  /builds/worker/checkouts/gecko/js/src/vtune/ittnotify_static.c: In function '__itt_get_groups':
[task 2021-05-19T04:07:57.130Z] 04:07:57     INFO -  /builds/worker/checkouts/gecko/js/src/vtune/ittnotify_config.h:333:35: note: length computed here
[task 2021-05-19T04:07:57.130Z] 04:07:57     INFO -    333 | #define __itt_fstrnlen(s, l)      strlen(s)
[task 2021-05-19T04:07:57.130Z] 04:07:57     INFO -        |                                   ^~~~~~~~~
[task 2021-05-19T04:07:57.130Z] 04:07:57     INFO -  /builds/worker/checkouts/gecko/js/src/vtune/ittnotify_static.c:838:26: note: in expansion of macro '__itt_fstrnlen'
[task 2021-05-19T04:07:57.130Z] 04:07:57     INFO -    838 |             size_t len = __itt_fstrnlen(env, MAX_ENV_VALUE_SIZE);
[task 2021-05-19T04:07:57.130Z] 04:07:57     INFO -        |                          ^~~~~~~~~~~~~~
[task 2021-05-19T04:07:57.131Z] 04:07:57     INFO -  In file included from /builds/worker/fetches/sysroot/usr/include/string.h:640,
[task 2021-05-19T04:07:57.131Z] 04:07:57     INFO -                   from /builds/worker/workspace/obj-build/dist/system_wrappers/string.h:3,
[task 2021-05-19T04:07:57.131Z] 04:07:57     INFO -                   from /builds/worker/checkouts/gecko/js/src/vtune/ittnotify_static.c:71:
[task 2021-05-19T04:07:57.131Z] 04:07:57     INFO -  In function 'strncpy',
[task 2021-05-19T04:07:57.131Z] 04:07:57     INFO -      inlined from '__itt_get_env_var' at /builds/worker/checkouts/gecko/js/src/vtune/ittnotify_static.c:843:17,
[task 2021-05-19T04:07:57.131Z] 04:07:57     INFO -      inlined from '__itt_get_lib_name' at /builds/worker/checkouts/gecko/js/src/vtune/ittnotify_static.c:856:28,
[task 2021-05-19T04:07:57.132Z] 04:07:57     INFO -      inlined from '__itt_init_ittlib' at /builds/worker/checkouts/gecko/js/src/vtune/ittnotify_static.c:1120:32:
[task 2021-05-19T04:07:57.132Z] 04:07:57    ERROR -  /builds/worker/fetches/sysroot/usr/include/x86_64-linux-gnu/bits/string3.h:120:10: error: '__builtin_strncpy' specified bound depends on the length of the source argument [-Werror=stringop-truncation]
[task 2021-05-19T04:07:57.132Z] 04:07:57     INFO -    120 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
[task 2021-05-19T04:07:57.132Z] 04:07:57     INFO -        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2021-05-19T04:07:57.132Z] 04:07:57     INFO -  In file included from /builds/worker/checkouts/gecko/js/src/vtune/ittnotify_static.c:59:
[task 2021-05-19T04:07:57.132Z] 04:07:57     INFO -  /builds/worker/checkouts/gecko/js/src/vtune/ittnotify_static.c: In function '__itt_init_ittlib':
[task 2021-05-19T04:07:57.132Z] 04:07:57     INFO -  /builds/worker/checkouts/gecko/js/src/vtune/ittnotify_config.h:333:35: note: length computed here
[task 2021-05-19T04:07:57.132Z] 04:07:57     INFO -    333 | #define __itt_fstrnlen(s, l)      strlen(s)
[task 2021-05-19T04:07:57.132Z] 04:07:57     INFO -        |                                   ^~~~~~~~~
[task 2021-05-19T04:07:57.133Z] 04:07:57     INFO -  /builds/worker/checkouts/gecko/js/src/vtune/ittnotify_static.c:838:26: note: in expansion of macro '__itt_fstrnlen'
[task 2021-05-19T04:07:57.133Z] 04:07:57     INFO -    838 |             size_t len = __itt_fstrnlen(env, MAX_ENV_VALUE_SIZE);
[task 2021-05-19T04:07:57.133Z] 04:07:57     INFO -        |                          ^~~~~~~~~~~~~~
[task 2021-05-19T04:07:57.133Z] 04:07:57     INFO -  cc1: all warnings being treated as errors
Assignee: nobody → mh+mozilla
Status: NEW → ASSIGNED
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/b29f92a90eb6
Disable stringop-truncation warning on third party vtune code. r=jandem,firefox-build-system-reviewers,mhentges
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Blocks: 1714004
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: