New issue
Advanced search Search tips

Issue 669029 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 668413



Sign in to add a comment

Difference between x64 and ia32: order of OwnPropertyNames

Project Member Reported by machenb...@chromium.org, Nov 28 2016

Issue description

Maybe WAI, but makes processing hard.

print(Object.getOwnPropertyNames(this))

Has different order of properties in ia32 and x64. Any tricks to make this equal? Otherwise the method selecting random properties is non-deterministic.
 
Cc: cbruni@chromium.org jkummerow@chromium.org

Comment 2 by cbruni@chromium.org, Nov 28 2016

Owner: cbruni@chromium.org
Status: Started (was: Untriaged)
Order is spec defined, so this must be a real bug.
Project Member

Comment 3 by bugdroid1@chromium.org, Dec 5 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/v8/v8.git/+/7036eec6f7488e205c5583293e98e9f201d506b2

commit 7036eec6f7488e205c5583293e98e9f201d506b2
Author: cbruni <cbruni@chromium.org>
Date: Mon Dec 05 20:17:13 2016

Copy dictionary keys and values in enumeration in TransferNamedProperties

During bootstrapping when installing the global object we copy over the
properties from the snapshotted global object to the one created from a
provided template. Originally Genesis::TransferNamedProperties just iterated
over the entries, making the final order hash and thus platform dependent.
This CL fixes this by sorting the keys by enumeration index before copying them
to the destination object and thus making the key enumaration on the global
object platform independent.

Drive-by-fix: avoid crash when printing the global object during bootstrapping.

BUG= chromium:669029 

Review-Url: https://codereview.chromium.org/2533223002
Cr-Commit-Position: refs/heads/master@{#41502}

[modify] https://crrev.com/7036eec6f7488e205c5583293e98e9f201d506b2/src/api.cc
[modify] https://crrev.com/7036eec6f7488e205c5583293e98e9f201d506b2/src/bootstrapper.cc
[modify] https://crrev.com/7036eec6f7488e205c5583293e98e9f201d506b2/src/objects-printer.cc
[modify] https://crrev.com/7036eec6f7488e205c5583293e98e9f201d506b2/src/objects.cc
[modify] https://crrev.com/7036eec6f7488e205c5583293e98e9f201d506b2/src/objects.h

Status: Fixed (was: Started)
Labels: v8-foozzie-failure

Sign in to add a comment