RESOLVED FIXED272309
Workaround restrict error with GCC 12
https://bugs.webkit.org/show_bug.cgi?id=272309
Summary Workaround restrict error with GCC 12
Patrick Griffis
Reported 2024-04-07 17:10:33 PDT
In static member function ‘static constexpr std::char_traits<char>::char_type* std::char_traits<char>::copy(char_type*, const char_type*, std::size_t)’, inlined from ‘static constexpr void std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_S_copy(_CharT*, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:431:21, inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Allocator>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::_M_replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.tcc:532:22, inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::replace(size_type, size_type, const _CharT*, size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:2179:19, inlined from ‘constexpr std::__cxx11::basic_string<_CharT, _Traits, _Alloc>& std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at /usr/include/c++/12/bits/basic_string.h:1936:22, inlined from ‘std::ostream& WTF::operator<<(std::ostream&, Int128Impl)’ at /host/home/tingping/Projects/WebKit/Source/WTF/wtf/Int128.cpp:268:17: /usr/include/c++/12/bits/char_traits.h:435:56: error: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372036854775810 or more bytes at offsets [2, 9223372036854775807] and 1 may overlap up to 9223372036854775813 bytes at offset -3 [-Werror=restrict] 435 | return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));
Attachments
Patrick Griffis
Comment 1 2024-04-07 17:11:32 PDT
EWS
Comment 2 2024-04-08 10:23:20 PDT
Committed 277203@main (bd1249cc9c4f): <https://commits.webkit.org/277203@main> Reviewed commits have been landed. Closing PR #26961 and removing active labels.
Radar WebKit Bug Importer
Comment 3 2024-04-08 10:24:14 PDT
Patrick Griffis
Comment 4 2024-04-08 12:52:40 PDT
For future readers, the upstream bug is here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
Note You need to log in before you can comment on or make changes to this bug.