Bug 1419637 - do not call memset on a non-trivial type. r?Ms2ger draft
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Wed, 22 Nov 2017 12:52:36 +0200
changeset 701873 c918e480c03938f4cead22acbd171c9cd95521ba
parent 701872 5378dcb45044a160fad93b02eed0c617f3324dbc
child 741290 3442d899232f1453c33e499bc8c9a2d002003f8f
push id90298
push userbmo:bpostelnicu@mozilla.com
push dateWed, 22 Nov 2017 10:54:01 +0000
reviewersMs2ger
bugs1419637
milestone59.0a1
Bug 1419637 - do not call memset on a non-trivial type. r?Ms2ger MozReview-Commit-ID: DSTv14zw8Tp
js/src/jit/shared/Assembler-shared.h
--- a/js/src/jit/shared/Assembler-shared.h
+++ b/js/src/jit/shared/Assembler-shared.h
@@ -309,17 +309,18 @@ struct PatchedAbsoluteAddress
 struct Address
 {
     Register base;
     int32_t offset;
 
     Address(Register base, int32_t offset) : base(base), offset(offset)
     { }
 
-    Address() { mozilla::PodZero(this); }
+    Address() : base(), offset(0)
+    { }
 };
 
 #if JS_BITS_PER_WORD == 32
 
 static inline Address
 LowWord(const Address& address) {
     CheckedInt<int32_t> offset = CheckedInt<int32_t>(address.offset) + INT64LOW_OFFSET;
     MOZ_ALWAYS_TRUE(offset.isValid());