WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
278436
[WebRTC] Ignore -Wthread-safety-reference-return warnings in libwebrtc headers
https://bugs.webkit.org/show_bug.cgi?id=278436
Summary
[WebRTC] Ignore -Wthread-safety-reference-return warnings in libwebrtc headers
David Kilzer (:ddkilzer)
Reported
2024-08-20 18:06:54 PDT
Ignore -Wthread-safety-reference-return warnings in libwebrtc headers. This is follow-on work for
Bug 274508
: Disable thread-safety-reference-return warnings in libwebrtc. Example warnings: In file included from Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm:32: In file included from Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h:38: In file included from WebKitBuild/Release/usr/local/include/webrtc/api/peer_connection_interface.h:135: In file included from WebKitBuild/Release/usr/local/include/webrtc/p2p/base/port.h:41: WebKitBuild/Release/usr/local/include/webrtc/p2p/base/connection.h:307:12: error: returning variable 'rtt_estimate_' by reference requires holding mutex 'network_thread_' [-Werror,-Wthread-safety-reference-return] 307 | return rtt_estimate_; | ^ In file included from Source/WebCore/platform/graphics/cocoa/VP9UtilitiesCocoa.mm:32: In file included from Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h:38: In file included from WebKitBuild/Release/usr/local/include/webrtc/api/peer_connection_interface.h:135: WebKitBuild/Release/usr/local/include/webrtc/p2p/base/port.h:253:48: error: returning variable 'password_' by reference requires holding mutex 'thread_' [-Werror,-Wthread-safety-reference-return] 253 | const std::string& password() const { return password_; } | ^ 2 errors generated. In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource363.cpp:2: In file included from Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:52: WebKitBuild/Release/usr/local/include/webrtc/pc/peer_connection_factory.h:108:12: error: returning variable 'options_' by reference requires holding mutex 'signaling_thread()' [-Werror,-Wthread-safety-reference-return] 108 | return options_; | ^ 1 error generated. In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource65.cpp:8: In file included from Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:26: In file included from Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.h:37: In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/rtc_stats_collector.h:33: In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/peer_connection_internal.h:24: In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/jsep_transport_controller.h:45: WebKitBuild/Release/usr/local/include/webrtc/p2p/base/p2p_transport_channel.h:194:12: error: returning variable 'ports_' by reference requires holding mutex 'network_thread_' [-Werror,-Wthread-safety-reference-return] 194 | return ports_; | ^ WebKitBuild/Release/usr/local/include/webrtc/p2p/base/p2p_transport_channel.h:198:12: error: returning variable 'pruned_ports_' by reference requires holding mutex 'network_thread_' [-Werror,-Wthread-safety-reference-return] 198 | return pruned_ports_; | ^ WebKitBuild/Release/usr/local/include/webrtc/p2p/base/p2p_transport_channel.h:235:12: error: returning variable 'remote_candidates_' by reference requires holding mutex 'network_thread_' [-Werror,-Wthread-safety-reference-return] 235 | return remote_candidates_; | ^ In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource65.cpp:8: In file included from Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:26: In file included from Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.h:37: In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/rtc_stats_collector.h:33: In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/peer_connection_internal.h:24: In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/jsep_transport_controller.h:54: WebKitBuild/Release/usr/local/include/webrtc/pc/jsep_transport_collection.h:51:12: error: returning variable 'bundle_groups_' by reference requires holding mutex 'sequence_checker_' [-Werror,-Wthread-safety-reference-return] 51 | return bundle_groups_; | ^ In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource65.cpp:8: In file included from Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:26: In file included from Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.h:37: In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/rtc_stats_collector.h:33: In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/peer_connection_internal.h:27: In file included from WebKitBuild/Release/usr/local/include/webrtc/pc/rtp_transmission_manager.h:36: WebKitBuild/Release/usr/local/include/webrtc/pc/transceiver_list.h:142:12: error: returning variable 'transceiver_stable_states_by_transceivers_' by reference requires holding mutex 'sequence_checker_' exclusively [-Werror,-Wthread-safety-reference-return] 142 | return transceiver_stable_states_by_transceivers_; | ^ 5 errors generated.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-08-20 18:07:15 PDT
<
rdar://problem/134381989
>
David Kilzer (:ddkilzer)
Comment 2
2024-08-20 18:13:24 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/32500
David Kilzer (:ddkilzer)
Comment 3
2024-08-21 18:11:08 PDT
Committed
282595@main
(b6c925c):
https://commits.webkit.org/282595@main
Reviewed commits have been landed. Closing PR #32500 and removing active labels.
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