WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
232989
Misc compiler warnings
https://bugs.webkit.org/show_bug.cgi?id=232989
Summary
Misc compiler warnings
Milan Crha
Reported
2021-11-11 02:25:13 PST
I configured the 2.34.1 release tarball sources as this: -- Enabled features: -- ENABLE_BUBBLEWRAP_SANDBOX ..................... ON -- ENABLE_DRAG_SUPPORT ON -- ENABLE_GAMEPAD ................................ OFF -- ENABLE_GLES2 OFF -- ENABLE_GTKDOC ................................. OFF -- ENABLE_INTROSPECTION OFF -- ENABLE_MEDIA_SOURCE ........................... ON -- ENABLE_MINIBROWSER ON -- ENABLE_QUARTZ_TARGET .......................... OFF -- ENABLE_SPELLCHECK ON -- ENABLE_TOUCH_EVENTS ........................... ON -- ENABLE_VIDEO ON -- ENABLE_WAYLAND_TARGET ......................... OFF -- ENABLE_WEBDRIVER ON -- ENABLE_WEB_AUDIO .............................. ON -- ENABLE_WEB_CRYPTO ON -- ENABLE_X11_TARGET ............................. ON -- USE_AVIF OFF -- USE_GTK4 ...................................... OFF -- USE_LCMS OFF -- USE_LIBHYPHEN ................................. ON -- USE_LIBNOTIFY ON -- USE_LIBSECRET ................................. ON -- USE_OPENGL_OR_ES ON -- USE_OPENJPEG .................................. ON -- USE_SOUP2 OFF -- USE_SYSTEMD ................................... ON -- USE_WOFF2 ON -- USE_WPE_RENDERER .............................. OFF and I see several compiler warnings, some quite important, from my point of view. [1026/5040] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-37.cpp.o In file included from .../webkitgtk-2.34.1/_build/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-37.cpp:6: .../webkitgtk-2.34.1/Source/JavaScriptCore/runtime/TemporalDuration.cpp: In function ‘JSC::PropertyName JSC::propertyName(JSC::VM&, unsigned int)’: .../webkitgtk-2.34.1/Source/JavaScriptCore/runtime/TemporalDuration.cpp:45:1: warning: control reaches end of non-void function [-Wreturn-type] 45 | } | ^ [1030/5040] Building CXX object Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-38.cpp.o In file included from .../webkitgtk-2.34.1/_build/JavaScriptCore/DerivedSources/unified-sources/UnifiedSource-f2e18ffc-38.cpp:2: .../webkitgtk-2.34.1/Source/JavaScriptCore/runtime/TemporalObject.cpp: In function ‘double JSC::roundNumberToIncrement(double, double, JSC::RoundingMode)’: .../webkitgtk-2.34.1/Source/JavaScriptCore/runtime/TemporalObject.cpp:331:1: warning: control reaches end of non-void function [-Wreturn-type] 331 | } | ^ [2263/5040] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-3a52ce78-7.cpp.o In file included from .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/unified-sources/UnifiedSource-3a52ce78-7.cpp:6: .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSAudioWorkletNodeOptions.cpp: In function ‘T WebCore::convertDictionary(JSC::JSGlobalObject&, JSC::JSValue) [with T = WebCore::AudioWorkletNodeOptions]’: .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSAudioWorkletNodeOptions.cpp:57:29: warning: ‘((unsigned int*)((char*)&result + offsetof(WebCore::AudioWorkletNodeOptions, WebCore::AudioWorkletNodeOptions::outputChannelCount.std::optional<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc> >::<unnamed>.std::_Optional_base<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>, false, false>::_M_payload.std::_Optional_payload<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>, false, false, false>::<unnamed>.std::_Optional_payload<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>, true, false, false>::<unnamed>.std:: _Optional_payload_base<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc> >::_M_payload)))[2]’ is used uninitialized [-Wuninitialized] 57 | AudioWorkletNodeOptions result; | ^~~~~~ .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSAudioWorkletNodeOptions.cpp:57:29: warning: ‘((unsigned int*)((char*)&result + offsetof(WebCore::AudioWorkletNodeOptions, WebCore::AudioWorkletNodeOptions::outputChannelCount.std::optional<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc> >::<unnamed>.std::_Optional_base<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>, false, false>::_M_payload.std::_Optional_payload<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>, false, false, false>::<unnamed>.std::_Optional_payload<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>, true, false, false>::<unnamed>.std:: _Optional_payload_base<WTF::Vector<unsigned int, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc> >::_M_payload)))[3]’ is used uninitialized [-Wuninitialized] [2312/5040] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-3a52ce78-58.cpp.o In file included from .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/unified-sources/UnifiedSource-3a52ce78-58.cpp:1: .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSMediaEncodingConfiguration.cpp: In function ‘T WebCore::convertDictionary(JSC::JSGlobalObject&, JSC::JSValue) [with T = WebCore::MediaEncodingConfiguration]’: .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSMediaEncodingConfiguration.cpp:46:32: warning: ‘*(WebCore::VideoConfiguration*)((char*)&result + offsetof(WebCore::MediaEncodingConfiguration, WebCore::MediaEncodingConfiguration::<unnamed>.WebCore::MediaConfiguration::video.std::optional<WebCore::VideoConfiguration>::<unnamed>.std::_Optional_base<WebCore::VideoConfiguration, false, false>::<unnamed>)).WebCore::VideoConfiguration::width’ is used uninitialized [-Wuninitialized] 46 | MediaEncodingConfiguration result; | ^~~~~~ .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSMediaEncodingConfiguration.cpp:46:32: warning: ‘*(WebCore::VideoConfiguration*)((char*)&result + offsetof(WebCore::MediaEncodingConfiguration, WebCore::MediaEncodingConfiguration::<unnamed>.WebCore::MediaConfiguration::video.std::optional<WebCore::VideoConfiguration>::<unnamed>.std::_Optional_base<WebCore::VideoConfiguration, false, false>::<unnamed>)) .WebCore::VideoConfiguration::height’ is used uninitialized [-Wuninitialized] [2313/5040] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-3a52ce78-57.cpp.o In file included from .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/unified-sources/UnifiedSource-3a52ce78-57.cpp:3: .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSMediaDecodingConfiguration.cpp: In function ‘T WebCore::convertDictionary(JSC::JSGlobalObject&, JSC::JSValue) [with T = WebCore::MediaDecodingConfiguration]’: .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSMediaDecodingConfiguration.cpp:46:32: warning: ‘*(WebCore::VideoConfiguration*)((char*)&result + offsetof(WebCore::MediaDecodingConfiguration, WebCore::MediaDecodingConfiguration::<unnamed>.WebCore::MediaConfiguration::video.std::optional<WebCore::VideoConfiguration>::<unnamed>.std::_Optional_base<WebCore::VideoConfiguration, false, false>::<unnamed>)) .WebCore::VideoConfiguration::width’ is used uninitialized [-Wuninitialized] 46 | MediaDecodingConfiguration result; | ^~~~~~ .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSMediaDecodingConfiguration.cpp:46:32: warning: ‘*(WebCore::VideoConfiguration*)((char*)&result + offsetof(WebCore::MediaDecodingConfiguration, WebCore::MediaDecodingConfiguration::<unnamed>.WebCore::MediaConfiguration::video.std::optional<WebCore::VideoConfiguration>::<unnamed>.std::_Optional_base<WebCore::VideoConfiguration, false, false>::<unnamed>)) .WebCore::VideoConfiguration::height’ is used uninitialized [-Wuninitialized] [2604/5040] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-207b877e-6.cpp.o In file included from .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/unified-sources/UnifiedSource-207b877e-6.cpp:8: .../webkitgtk-2.34.1/Source/WebCore/layout/integration/LayoutIntegrationLineIterator.cpp: In member function ‘WebCore::LayoutIntegration::RunIterator WebCore::LayoutIntegration::LineIterator::closestRunForLogicalLeftPosition(int, bool)’: .../webkitgtk-2.34.1/Source/WebCore/layout/integration/LayoutIntegrationLineIterator.cpp:178:10: warning: ‘((WTF::RefCountedArray<const WebCore::LegacyInlineBox*, WTF::RawPtrTraits<const WebCore::LegacyInlineBox*> >*)((char*)&closestRun + offsetof(WebCore::LayoutIntegration::RunIterator, WebCore::LayoutIntegration::RunIterator::m_run.WebCore::LayoutIntegration::PathRun::m_pathVariant.WTF::Variant<WebCore::LayoutIntegration::RunIteratorLegacyPath>::__storage)))[1] .WTF::RefCountedArray<const WebCore::LegacyInlineBox*>::m_data’ is used uninitialized [-Wuninitialized] 178 | auto closestRun = lastRun; | ^~~~~~~~~~ .../webkitgtk-2.34.1/Source/WebCore/layout/integration/LayoutIntegrationLineIterator.cpp:178:10: warning: ‘*(WebCore::LayoutIntegration::RunIteratorLegacyPath*)((char*)&closestRun + offsetof(WebCore::LayoutIntegration::RunIterator, WebCore::LayoutIntegration::RunIterator::m_run.WebCore::LayoutIntegration::PathRun::m_pathVariant.WTF::Variant<WebCore::LayoutIntegration::RunIteratorLegacyPath>::<unnamed>)) .WebCore::LayoutIntegration::RunIteratorLegacyPath::m_inlineBox’ is used uninitialized [-Wuninitialized] [2704/5040] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-50.cpp.o In file included from .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-50.cpp:3: .../webkitgtk-2.34.1/Source/WebCore/platform/network/DataURLDecoder.cpp: In member function ‘Out WTF::Detail::CallableWrapper< <template-parameter-1-1>, <template-parameter-1-2>, <template-parameter-1-3> >::call(In ...) [with CallableType = WebCore::DataURLDecoder::decode(const WTF::URL&, const WebCore::DataURLDecoder::ScheduleContext&, WebCore::DataURLDecoder::Mode, WebCore::DataURLDecoder::DecodeCompletionHandler&&)::<lambda()>; Out = void; In = {}]’: .../webkitgtk-2.34.1/Source/WebCore/platform/network/DataURLDecoder.cpp:202:14: warning: ‘((WTF::StringImpl**)((char*)&callCompletionHandler + offsetof(WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248, WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248::__result.std::optional<WebCore::DataURLDecoder::Result>::<unnamed>.std::_Optional_base<WebCore::DataURLDecoder::Result, false, false>::_M_payload.std::_Optional_payload<WebCore::DataURLDecoder::Result, false, false, false>::<unnamed>.std::_Optional_payload<WebCore::DataURLDecoder::Result, true, false, false>::<unnamed> .std::_Optional_payload_base<WebCore::DataURLDecoder::Result>::_M_payload)))[1]’ is used uninitialized [-Wuninitialized] 202 | auto callCompletionHandler = [result = WTFMove(result), completionHandler = WTFMove(decodeTask->completionHandler)]() mutable { | ^~~~~~~~~~~~~~~~~~~~~ .../webkitgtk-2.34.1/Source/WebCore/platform/network/DataURLDecoder.cpp:202:14: warning: ‘*(WTF::StringImpl**)((char*)&callCompletionHandler + offsetof(WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248, WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248::__result.std::optional<WebCore::DataURLDecoder::Result>::<unnamed> .std::_Optional_base<WebCore::DataURLDecoder::Result, false, false>::<unnamed>))’ is used uninitialized [-Wuninitialized] .../webkitgtk-2.34.1/Source/WebCore/platform/network/DataURLDecoder.cpp:202:14: warning: ‘((WTF::VectorBufferBase<unsigned char, WTF::FastMalloc>*)((char*)&callCompletionHandler + offsetof(WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248, WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248::__result.std::optional<WebCore::DataURLDecoder::Result>::<unnamed>.std::_Optional_base<WebCore::DataURLDecoder::Result, false, false>::_M_payload.std::_Optional_payload<WebCore::DataURLDecoder::Result, false, false, false>::<unnamed>.std::_Optional_payload<WebCore::DataURLDecoder::Result, true, false, false>::<unnamed>.std::_Optional_payload_base<WebCore::DataURLDecoder::Result>::_M_payload) + 8))[1] .WTF::VectorBufferBase<unsigned char, WTF::FastMalloc>::m_buffer’ is used uninitialized [-Wuninitialized] .../webkitgtk-2.34.1/Source/WebCore/platform/network/DataURLDecoder.cpp:202:14: warning: ‘((WTF::StringImpl**)((char*)&callCompletionHandler + offsetof(WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248, WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248::__result.std::optional<WebCore::DataURLDecoder::Result>::<unnamed>.std::_Optional_base<WebCore::DataURLDecoder::Result, false, false>::_M_payload.std::_Optional_payload<WebCore::DataURLDecoder::Result, false, false, false>::<unnamed>.std::_Optional_payload<WebCore::DataURLDecoder::Result, true, false, false>::<unnamed> .std::_Optional_payload_base<WebCore::DataURLDecoder::Result>::_M_payload)))[2]’ is used uninitialized [-Wuninitialized] .../webkitgtk-2.34.1/Source/WebCore/platform/network/DataURLDecoder.cpp:202:14: warning: ‘((WTF::VectorBufferBase<unsigned char, WTF::FastMalloc>*)((char*)&callCompletionHandler + offsetof(WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248, WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248::__result.std::optional<WebCore::DataURLDecoder::Result>::<unnamed>.std::_Optional_base<WebCore::DataURLDecoder::Result, false, false>::_M_payload.std::_Optional_payload<WebCore::DataURLDecoder::Result, false, false, false>::<unnamed>.std::_Optional_payload<WebCore::DataURLDecoder::Result, true, false, false>::<unnamed>.std::_Optional_payload_base<WebCore::DataURLDecoder::Result>::_M_payload) + 8))[1] .WTF::VectorBufferBase<unsigned char, WTF::FastMalloc>::m_capacity’ is used uninitialized [-Wuninitialized] .../webkitgtk-2.34.1/Source/WebCore/platform/network/DataURLDecoder.cpp:202:14: warning: ‘((WTF::VectorBufferBase<unsigned char, WTF::FastMalloc>*)((char*)&callCompletionHandler + offsetof(WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248, WebCore::DataURLDecoder::decode::._anon_247::operator()::._anon_248::__result.std::optional<WebCore::DataURLDecoder::Result>::<unnamed>.std::_Optional_base<WebCore::DataURLDecoder::Result, false, false>::_M_payload.std::_Optional_payload<WebCore::DataURLDecoder::Result, false, false, false>::<unnamed>.std::_Optional_payload<WebCore::DataURLDecoder::Result, true, false, false>::<unnamed>.std::_Optional_payload_base<WebCore::DataURLDecoder::Result>::_M_payload) + 8))[1] .WTF::VectorBufferBase<unsigned char, WTF::FastMalloc>::m_size’ is used uninitialized [-Wuninitialized] ================================================================================================================================ The (currently) latest build for the Fedora does not show all of those, but there are some important too:
https://kojipkgs.fedoraproject.org//packages/webkit2gtk3/2.34.1/6.fc36/data/logs/x86_64/build.log
I search for "[-w" (quotes for clarity only) to filter them out, after replacing "[-Wodr]" (quotes for clarity only) with something else, because there are a lot of those. One which may worth a note is: In function 'memcpy', inlined from 'get' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WTF/Headers/wtf/Packed.h:146:15, inlined from '__conv_op ' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WTF/Headers/wtf/Packed.h:195:48, inlined from '__conv_op ' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WTF/Headers/wtf/RefPtr.h:89:57, inlined from 'isShared' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/JavaScriptCore/PrivateHeaders/JavaScriptCore/ArrayBuffer.h:84:36, inlined from 'isShared' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/JavaScriptCore/PrivateHeaders/JavaScriptCore/ArrayBuffer.h:202:31, inlined from 'unsharedBuffer' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/JavaScriptCore/PrivateHeaders/JavaScriptCore/ArrayBufferView.h:60:9, inlined from 'send' at /builddir/build/BUILD/webkitgtk-2.34.1/Source/WebCore/Modules/websockets/WebSocket.cpp:389:52, inlined from 'operator()' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WebCore/DerivedSources/JSWebSocket.cpp:535:5, inlined from 'toJS' at /builddir/build/BUILD/webkitgtk-2.34.1/Source/WebCore/bindings/js/JSDOMConvertBase.h:168:18, inlined from 'jsWebSocketPrototypeFunction_send2Body' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WebCore/DerivedSources/JSWebSocket.cpp:535:5, inlined from 'jsWebSocketPrototypeFunction_sendOverloadDispatcher' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WebCore/DerivedSources/JSWebSocket.cpp:576:13, inlined from 'call' at /builddir/build/BUILD/webkitgtk-2.34.1/Source/WebCore/bindings/js/JSDOMOperation.h:63:9, inlined from 'jsWebSocketPrototypeFunction_send' at /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WebCore/DerivedSources/JSWebSocket.cpp:586:96: /usr/include/bits/string_fortified.h:29:33: warning: '__builtin_memcpy' reading 6 bytes from a region of size 0 [-Wstringop-overread] 29 | return __builtin___memcpy_chk (__dest, __src, __len, | ^ I do not know whether it's a false positive or not.
Attachments
[fast-cq] Patch
(5.12 KB, patch)
2021-11-11 10:47 PST
,
Michael Catanzaro
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2021-11-11 07:55:07 PST
They all look like spam to me. Which of those do you consider important? I try to keep trunk warning-free, so these should mostly all be fixed already on trunk, but I don't make any such effort for the release branches.
> In function 'memcpy', > inlined from 'get' at > /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WTF/Headers/wtf/ > Packed.h:146:15, > inlined from '__conv_op ' at > /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WTF/Headers/wtf/ > Packed.h:195:48, > inlined from '__conv_op ' at > /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WTF/Headers/wtf/ > RefPtr.h:89:57, > inlined from 'isShared' at > /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/JavaScriptCore/ > PrivateHeaders/JavaScriptCore/ArrayBuffer.h:84:36, > inlined from 'isShared' at > /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/JavaScriptCore/ > PrivateHeaders/JavaScriptCore/ArrayBuffer.h:202:31, > inlined from 'unsharedBuffer' at > /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/JavaScriptCore/ > PrivateHeaders/JavaScriptCore/ArrayBufferView.h:60:9, > inlined from 'send' at > /builddir/build/BUILD/webkitgtk-2.34.1/Source/WebCore/Modules/websockets/ > WebSocket.cpp:389:52, > inlined from 'operator()' at > /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WebCore/ > DerivedSources/JSWebSocket.cpp:535:5, > inlined from 'toJS' at > /builddir/build/BUILD/webkitgtk-2.34.1/Source/WebCore/bindings/js/ > JSDOMConvertBase.h:168:18, > inlined from 'jsWebSocketPrototypeFunction_send2Body' at > /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WebCore/ > DerivedSources/JSWebSocket.cpp:535:5, > inlined from 'jsWebSocketPrototypeFunction_sendOverloadDispatcher' at > /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WebCore/ > DerivedSources/JSWebSocket.cpp:576:13, > inlined from 'call' at > /builddir/build/BUILD/webkitgtk-2.34.1/Source/WebCore/bindings/js/ > JSDOMOperation.h:63:9, > inlined from 'jsWebSocketPrototypeFunction_send' at > /builddir/build/BUILD/webkitgtk-2.34.1/redhat-linux-build/WebCore/ > DerivedSources/JSWebSocket.cpp:586:96: > /usr/include/bits/string_fortified.h:29:33: warning: '__builtin_memcpy' > reading 6 bytes from a region of size 0 [-Wstringop-overread] > 29 | return __builtin___memcpy_chk (__dest, __src, __len, > | ^ > > I do not know whether it's a false positive or not.
I haven't looked closely, but my experience with -Wstringop-overread is the warning is almost always a false positive, or else so obtuse and unclear that it's unclear whether anything is actually wrong. This one is particularly annoying since it's coming from generated sources, so we'd have to investigate the generator to see what's going on. I think it's only worth investigating if the warning still happens when building trunk. -Wodr is
bug #229867
.
Michael Catanzaro
Comment 2
2021-11-11 08:37:34 PST
(In reply to Michael Catanzaro from
comment #1
)
> I haven't looked closely, but my experience with -Wstringop-overread is the > warning is almost always a false positive, or else so obtuse and unclear > that it's unclear whether anything is actually wrong. This one is > particularly annoying since it's coming from generated sources, so we'd have > to investigate the generator to see what's going on. I think it's only worth > investigating if the warning still happens when building trunk.
This one is actually happening with trunk. Maybe GCC changed? Fortunately, I have a much better warning message in my build: [5489/5749] Linking CXX executable bin/TestWebKitAPI/TestWebCore /home/mcatanzaro/Projects/WebKit/Source/ThirdParty/ANGLE/src/compiler/translator/ParseContext.h:33: note: type name ‘sh::TParseContext’ should match type name ‘angle::pp::Tokenizer::Context’ 33 | class TParseContext : angle::NonCopyable | /home/mcatanzaro/Projects/WebKit/Source/ThirdParty/ANGLE/src/compiler/preprocessor/Tokenizer.h:25: note: the incompatible type is defined here 25 | struct Context | In member function ‘get’, inlined from ‘__conv_op ’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME/WTF/Headers/wtf/Packed.h:198:48, inlined from ‘__conv_op ’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME/WTF/Headers/wtf/RefPtr.h:89:57, inlined from ‘isShared’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME/JavaScriptCore/PrivateHeaders/JavaScriptCore/ArrayBuffer.h:93:36, inlined from ‘isShared’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME/JavaScriptCore/PrivateHeaders/JavaScriptCore/ArrayBuffer.h:211:31, inlined from ‘unsharedBuffer’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME/JavaScriptCore/PrivateHeaders/JavaScriptCore/ArrayBufferView.h:61:9, inlined from ‘send’ at /home/mcatanzaro/Projects/WebKit/Source/WebCore/Modules/websockets/WebSocket.cpp:386:52, inlined from ‘operator()’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME/WebCore/DerivedSources/JSWebSocket.cpp:537:5, inlined from ‘toJS’ at /home/mcatanzaro/Projects/WebKit/Source/WebCore/bindings/js/JSDOMConvertBase.h:168:18, inlined from ‘jsWebSocketPrototypeFunction_send2Body’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME/WebCore/DerivedSources/JSWebSocket.cpp:537:5, inlined from ‘jsWebSocketPrototypeFunction_sendOverloadDispatcher’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME/WebCore/DerivedSources/JSWebSocket.cpp:578:13, inlined from ‘call’ at /home/mcatanzaro/Projects/WebKit/Source/WebCore/bindings/js/JSDOMOperation.h:63:9, inlined from ‘jsWebSocketPrototypeFunction_send’ at /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME/WebCore/DerivedSources/JSWebSocket.cpp:588:96: /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME/WTF/Headers/wtf/Packed.h:146:15: warning: ‘__builtin_memcpy’ reading 6 bytes from a region of size 0 [-Wstringop-overread] 146 | memcpy(&value, m_storage.data(), storageSize); | ^ So it's
bug #226557
again, but this time with a different file. Sigh. Probably this warning will have to be turned off globally. I have some relevant discussion with the GCC developers in
https://bugzilla.redhat.com/show_bug.cgi?id=2002031#c5
.
Michael Catanzaro
Comment 3
2021-11-11 08:53:46 PST
(In reply to Michael Catanzaro from
comment #2
)
> Maybe GCC changed?
I think it's only emitted with LTO enabled.
Michael Catanzaro
Comment 4
2021-11-11 10:44:48 PST
I've uploaded a patch for -Wodr in
bug #229867
. Also reopened
bug #226557
. I'll submit one more patch here to fix current misc warnings that appear on trunk. I don't notice any of the -Wuninitialized warnings, so won't bother with those (maybe they're already fixed on trunk).
Michael Catanzaro
Comment 5
2021-11-11 10:47:18 PST
Created
attachment 443973
[details]
[fast-cq] Patch
EWS
Comment 6
2021-11-11 14:04:35 PST
Found 1 new test failure: imported/w3c/web-platform-tests/css/css-properties-values-api/registered-property-revert.html
EWS
Comment 7
2021-11-11 16:19:59 PST
Found 1 new test failure: imported/w3c/web-platform-tests/css/css-properties-values-api/registered-property-revert.html
EWS
Comment 8
2021-11-11 17:21:08 PST
Committed
r285694
(
244164@main
): <
https://commits.webkit.org/244164@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 443973
[details]
.
Milan Crha
Comment 9
2021-11-11 23:12:22 PST
(In reply to Michael Catanzaro from
comment #1
)
> Which of those do you consider important?
(In reply to Michael Catanzaro from
comment #4
)
> I don't notice any of the -Wuninitialized warnings, so won't bother > with those (maybe they're already fixed on trunk).
Those are those I consider important, because using uninitialized memory can lead to undefined behavior. I believe you do not see them, because you have those optional parts enabled, while I have them disabled. Compare your "Enabled features:" with mine (
comment #0
).
Michael Catanzaro
Comment 10
2021-11-12 13:07:39 PST
If you get the warnings on trunk, I can take a closer look, but I really don't think it's worth looking at 2.34.1. These look pretty dumb tbh: [2312/5040] Building CXX object Source/WebCore/CMakeFiles/WebCore.dir/__/__/WebCore/DerivedSources/unified-sources/UnifiedSource-3a52ce78-58.cpp.o In file included from .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/unified-sources/UnifiedSource-3a52ce78-58.cpp:1: .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSMediaEncodingConfiguration.cpp: In function ‘T WebCore::convertDictionary(JSC::JSGlobalObject&, JSC::JSValue) [with T = WebCore::MediaEncodingConfiguration]’: .../webkitgtk-2.34.1/_build/WebCore/DerivedSources/JSMediaEncodingConfiguration.cpp:46:32: warning: ‘*(WebCore::VideoConfiguration*)((char*)&result + offsetof(WebCore::MediaEncodingConfiguration, WebCore::MediaEncodingConfiguration::<unnamed>.WebCore::MediaConfiguration::video.std::optional<WebCore::VideoConfiguration>::<unnamed>.std::_Optional_base<WebCore::VideoConfiguration, false, false>::<unnamed>)).WebCore::VideoConfiguration::width’ is used uninitialized [-Wuninitialized] 46 | MediaEncodingConfiguration result; | ^~~~~~ MediaEncodingConfiguration inherits from MediaConfiguration, which contains a std::optional<VideoConfiguration>. It's going to be disengaged after construction so unless I'm missing something, the warning doesn't make any sense. I also looked at the warning about DataURLDecoder.cpp and couldn't make any sense of it.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug