Bug 272309 - Workaround restrict error with GCC 12
Summary: Workaround restrict error with GCC 12
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Patrick Griffis
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-04-07 17:10 PDT by Patrick Griffis
Modified: 2024-04-08 12:52 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Griffis 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));
Comment 1 Patrick Griffis 2024-04-07 17:11:32 PDT
Pull request: https://github.com/WebKit/WebKit/pull/26961
Comment 2 EWS 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.
Comment 3 Radar WebKit Bug Importer 2024-04-08 10:24:14 PDT
<rdar://problem/126082293>
Comment 4 Patrick Griffis 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