Closed Bug 1711834 Opened 3 years ago Closed 3 years ago

[gcc 11] error: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' accessing 64 bytes at offsets 0 and 0 overlaps 64 bytes at offset 0 [-Werror=restrict]

Categories

(Core :: Graphics, 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:08:10.409Z] 04:08:10     INFO -  In file included from /builds/worker/fetches/sysroot/usr/include/string.h:640,
[task 2021-05-19T04:08:10.414Z] 04:08:10     INFO -                   from /builds/worker/workspace/obj-build/dist/system_wrappers/string.h:3,
[task 2021-05-19T04:08:10.414Z] 04:08:10     INFO -                   from /builds/worker/workspace/obj-build/dist/include/mozilla/throw_gcc.h:14,
[task 2021-05-19T04:08:10.414Z] 04:08:10     INFO -                   from /builds/worker/workspace/obj-build/dist/stl_wrappers/type_traits:80,
[task 2021-05-19T04:08:10.414Z] 04:08:10     INFO -                   from /builds/worker/fetches/gcc/include/c++/11.1.0/bits/move.h:57,
[task 2021-05-19T04:08:10.414Z] 04:08:10     INFO -                   from /builds/worker/fetches/gcc/include/c++/11.1.0/bits/stl_pair.h:59,
[task 2021-05-19T04:08:10.414Z] 04:08:10     INFO -                   from /builds/worker/fetches/gcc/include/c++/11.1.0/utility:70,
[task 2021-05-19T04:08:10.414Z] 04:08:10     INFO -                   from /builds/worker/workspace/obj-build/dist/system_wrappers/utility:3,
[task 2021-05-19T04:08:10.415Z] 04:08:10     INFO -                   from /builds/worker/workspace/obj-build/dist/stl_wrappers/utility:60,
[task 2021-05-19T04:08:10.415Z] 04:08:10     INFO -                   from /builds/worker/fetches/gcc/include/c++/11.1.0/algorithm:60,
[task 2021-05-19T04:08:10.415Z] 04:08:10     INFO -                   from /builds/worker/workspace/obj-build/dist/system_wrappers/algorithm:3,
[task 2021-05-19T04:08:10.415Z] 04:08:10     INFO -                   from /builds/worker/workspace/obj-build/dist/stl_wrappers/algorithm:60,
[task 2021-05-19T04:08:10.415Z] 04:08:10     INFO -                   from /builds/worker/workspace/obj-build/dist/include/mozilla/FontPropertyTypes.h:11,
[task 2021-05-19T04:08:10.416Z] 04:08:10     INFO -                   from /builds/worker/workspace/obj-build/dist/include/gfxPlatform.h:9,
[task 2021-05-19T04:08:10.416Z] 04:08:10     INFO -                   from /builds/worker/checkouts/gecko/gfx/layers/client/TextureClientRecycleAllocator.cpp:7,
[task 2021-05-19T04:08:10.416Z] 04:08:10     INFO -                   from Unified_cpp_gfx_layers7.cpp:2:
[task 2021-05-19T04:08:10.416Z] 04:08:10     INFO -  In function 'void* memcpy(void*, const void*, size_t)',
[task 2021-05-19T04:08:10.416Z] 04:08:10     INFO -      inlined from 'mozilla::gfx::Matrix4x4Typed<SourceUnits, TargetUnits, T>& mozilla::gfx::Matrix4x4Typed<SourceUnits, TargetUnits, T>::operator=(const mozilla::gfx::Matrix4x4Typed<SourceUnits, TargetUnits, T>&) [with SourceUnits = mozilla::gfx::UnknownUnits; TargetUnits = mozilla::gfx::UnknownUnits; T = float]' at /builds/worker/workspace/obj-build/dist/include/mozilla/gfx/Matrix.h:1162:11,
[task 2021-05-19T04:08:10.416Z] 04:08:10     INFO -      inlined from 'void mozilla::layers::TransformLayerGeometry(mozilla::layers::Layer*, mozilla::Maybe<mozilla::gfx::PolygonTyped<mozilla::gfx::UnknownUnits> >&)' at /builds/worker/checkouts/gecko/gfx/layers/composite/ContainerLayerComposite.cpp:171:37:
[task 2021-05-19T04:08:10.416Z] 04:08:10    ERROR -  /builds/worker/fetches/sysroot/usr/include/x86_64-linux-gnu/bits/string3.h:51:33: error: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' accessing 64 bytes at offsets 0 and 0 overlaps 64 bytes at offset 0 [-Werror=restrict]
[task 2021-05-19T04:08:10.416Z] 04:08:10     INFO -     51 |   return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest));
[task 2021-05-19T04:08:10.417Z] 04:08:10     INFO -        |          ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Blocks: build-gcc-11
Summary: error: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' accessing 64 bytes at offsets 0 and 0 overlaps 64 bytes at offset 0 [-Werror=restrict] → [gcc 11] error: 'void* __builtin_memcpy(void*, const void*, long unsigned int)' accessing 64 bytes at offsets 0 and 0 overlaps 64 bytes at offset 0 [-Werror=restrict]

This avoids GCC complaining about the case where doing m = m would
memcpy from an address onto itself.

Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/ce23a68098f1
Let the compiler generate the Matrix4x4Typed copy assignment operator. r=mattwoodrow
Status: NEW → 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: