Reviewers: iposva,

Description:
Make sure to initialize all fields in the special maps
created during bootstrapping. Without this change we
risk having weird flags set on the map for the null
value (among others), which can lead to crashes.

Please review this at http://codereview.chromium.org/552195

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/heap.cc


Index: src/heap.cc
===================================================================
--- src/heap.cc (revision 3724)
+++ src/heap.cc (working copy)
@@ -1185,7 +1185,10 @@
   reinterpret_cast<Map*>(result)->set_instance_type(instance_type);
   reinterpret_cast<Map*>(result)->set_instance_size(instance_size);
   reinterpret_cast<Map*>(result)->set_inobject_properties(0);
+  reinterpret_cast<Map*>(result)->set_pre_allocated_property_fields(0);
   reinterpret_cast<Map*>(result)->set_unused_property_fields(0);
+  reinterpret_cast<Map*>(result)->set_bit_field(0);
+  reinterpret_cast<Map*>(result)->set_bit_field2(0);
   return result;
 }



--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to