Title: [205362] trunk/Source/WTF
- Revision
- 205362
- Author
- [email protected]
- Date
- 2016-09-02 12:39:02 -0700 (Fri, 02 Sep 2016)
Log Message
bitwise_cast infinite loops if called from the default constructor in ToType
https://bugs.webkit.org/show_bug.cgi?id=161365
Patch by JF Bastien <[email protected]> on 2016-09-02
Reviewed by Saam Barati.
* wtf/StdLibExtras.h:
(WTF::bitwise_cast): use aggregate initialization to avoid ctor
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (205361 => 205362)
--- trunk/Source/WTF/ChangeLog 2016-09-02 19:17:27 UTC (rev 205361)
+++ trunk/Source/WTF/ChangeLog 2016-09-02 19:39:02 UTC (rev 205362)
@@ -1,3 +1,13 @@
+2016-09-02 JF Bastien <[email protected]>
+
+ bitwise_cast infinite loops if called from the default constructor in ToType
+ https://bugs.webkit.org/show_bug.cgi?id=161365
+
+ Reviewed by Saam Barati.
+
+ * wtf/StdLibExtras.h:
+ (WTF::bitwise_cast): use aggregate initialization to avoid ctor
+
2016-09-01 Anders Carlsson <[email protected]>
Use BlockPtr::fromCallable in WorkQueue::dispatch and WorkQueue::dispatchAfter
Modified: trunk/Source/WTF/wtf/StdLibExtras.h (205361 => 205362)
--- trunk/Source/WTF/wtf/StdLibExtras.h 2016-09-02 19:17:27 UTC (rev 205361)
+++ trunk/Source/WTF/wtf/StdLibExtras.h 2016-09-02 19:39:02 UTC (rev 205362)
@@ -151,7 +151,7 @@
static_assert(__is_trivially_copyable(ToType), "bitwise_cast of non-trivially-copyable type!");
static_assert(__is_trivially_copyable(FromType), "bitwise_cast of non-trivially-copyable type!");
#endif
- ToType to;
+ ToType to{ };
std::memcpy(&to, &from, sizeof(to));
return to;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes