Title: [275142] trunk/Source/WebCore
- Revision
- 275142
- Author
- [email protected]
- Date
- 2021-03-27 16:26:45 -0700 (Sat, 27 Mar 2021)
Log Message
UBSan: runtime error: load of value <unknown>, which is not a valid value for type 'const WebCore::RealtimeMediaSourceCapabilities::EchoCancellation'
<https://webkit.org/b/223821>
Reviewed by Chris Dumez.
Tests: fast/mediastream/MediaDevices-addEventListener.html
fast/mediastream/constraint-intrinsic-size.html
http/tests/media/media-stream/enumerate-devices-iframe-allow-attribute.html
http/tests/media/media-stream/get-display-media-iframe-allow-attribute.html
imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-bitrate.https.html
webrtc/addICECandidate-closed.html
webrtc/ice-candidate-sdpMLineIndex.html
webrtc/libwebrtc/descriptionGetters.html
webrtc/peerconnection-page-cache.html
* platform/mediastream/RealtimeMediaSourceCapabilities.h:
(WebCore::CapabilityValueOrRange::union ValueUnion):
- Make asDouble the first union member so C++ member
initializers set all memory.
(WebCore::CapabilityValueOrRange::m_minOrValue):
(WebCore::CapabilityValueOrRange::m_max):
(WebCore::CapabilityValueOrRange::m_type):
(WebCore::RealtimeMediaSourceCapabilities::m_echoCancellation):
- Provide member initializers. Setting a default value for
m_echoCancellation fixes the bug.
(WebCore::RealtimeMediaSourceCapabilities::encode const):
- Drive-by clean-up of encoder statement.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (275141 => 275142)
--- trunk/Source/WebCore/ChangeLog 2021-03-27 22:34:19 UTC (rev 275141)
+++ trunk/Source/WebCore/ChangeLog 2021-03-27 23:26:45 UTC (rev 275142)
@@ -1,3 +1,33 @@
+2021-03-27 David Kilzer <[email protected]>
+
+ UBSan: runtime error: load of value <unknown>, which is not a valid value for type 'const WebCore::RealtimeMediaSourceCapabilities::EchoCancellation'
+ <https://webkit.org/b/223821>
+
+ Reviewed by Chris Dumez.
+
+ Tests: fast/mediastream/MediaDevices-addEventListener.html
+ fast/mediastream/constraint-intrinsic-size.html
+ http/tests/media/media-stream/enumerate-devices-iframe-allow-attribute.html
+ http/tests/media/media-stream/get-display-media-iframe-allow-attribute.html
+ imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-bitrate.https.html
+ webrtc/addICECandidate-closed.html
+ webrtc/ice-candidate-sdpMLineIndex.html
+ webrtc/libwebrtc/descriptionGetters.html
+ webrtc/peerconnection-page-cache.html
+
+ * platform/mediastream/RealtimeMediaSourceCapabilities.h:
+ (WebCore::CapabilityValueOrRange::union ValueUnion):
+ - Make asDouble the first union member so C++ member
+ initializers set all memory.
+ (WebCore::CapabilityValueOrRange::m_minOrValue):
+ (WebCore::CapabilityValueOrRange::m_max):
+ (WebCore::CapabilityValueOrRange::m_type):
+ (WebCore::RealtimeMediaSourceCapabilities::m_echoCancellation):
+ - Provide member initializers. Setting a default value for
+ m_echoCancellation fixes the bug.
+ (WebCore::RealtimeMediaSourceCapabilities::encode const):
+ - Drive-by clean-up of encoder statement.
+
2021-03-27 Antoine Quint <[email protected]>
Fix build with ENABLE_CSS3_TEXT
Modified: trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCapabilities.h (275141 => 275142)
--- trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCapabilities.h 2021-03-27 22:34:19 UTC (rev 275141)
+++ trunk/Source/WebCore/platform/mediastream/RealtimeMediaSourceCapabilities.h 2021-03-27 23:26:45 UTC (rev 275142)
@@ -49,8 +49,8 @@
Type type() const { return m_type; }
union ValueUnion {
+ double asDouble;
int asInt;
- double asDouble;
};
CapabilityValueOrRange()
@@ -106,9 +106,9 @@
template<class Decoder> static WARN_UNUSED_RETURN bool decode(Decoder&, CapabilityValueOrRange&);
private:
- ValueUnion m_minOrValue;
- ValueUnion m_max;
- Type m_type;
+ ValueUnion m_minOrValue { };
+ ValueUnion m_max { };
+ Type m_type { Undefined };
};
template<class Encoder>
@@ -206,7 +206,7 @@
CapabilityValueOrRange m_volume;
CapabilityValueOrRange m_sampleRate;
CapabilityValueOrRange m_sampleSize;
- EchoCancellation m_echoCancellation;
+ EchoCancellation m_echoCancellation { EchoCancellation::ReadOnly };
AtomString m_deviceId;
AtomString m_groupId;
@@ -226,8 +226,8 @@
<< m_sampleSize
<< m_deviceId
<< m_groupId
- << m_supportedConstraints;
- encoder << m_echoCancellation;
+ << m_supportedConstraints
+ << m_echoCancellation;
}
template<class Decoder>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes