New issue
Advanced search Search tips

Issue 658185 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug

Blocking:
issue v8:5267
issue v8:4586



Sign in to add a comment

!escape_analysis_->IsVirtual(node) in escape-analysis-reducer.cc

Project Member Reported by ClusterFuzz, Oct 21 2016

Issue description

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=5145103457058816

Fuzzer: mbarbella_js_mutation
Job Type: linux_asan_d8_dbg
Platform Id: linux

Crash Type: CHECK failure
Crash Address: 
Crash State:
  !escape_analysis_->IsVirtual(node) in escape-analysis-reducer.cc
  
Regressed: V8: r40350:40351

Minimized Testcase (0.27 Kb):
Download: https://cluster-fuzz.appspot.com/download/AMIfv9729pwK_Bt_OOjXRf1fxgrv_hyvSAHD7tPoNuVPeCKMUHySwz8n_NC6FvXJz5NT2lU15BUZZ0yMfa7IrdjyLyX86Q4yH-FRkvnpLW5kQR4eWnCwh3aOBvvs3YEzGaZGkCA3kGXbBjMt83pbfOH53ZOPKBECBg?testcase_id=5145103457058816
try {
} catch(e) {; }
function __f_11() {
  var __v_14 = {x:1};
  var __v_11 = {__v_11:2.5, x:0};
  __v_14 = [];
  for (var __v_12 = 0; __v_12 < 2; __v_12++) {
    __v_13 = __v_14.x + 3;
    __v_14 = __v_11;
  }
}
__f_11();
__f_11();
%OptimizeFunctionOnNextCall(__f_11);
 __f_11();


Issue filed automatically.

See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.
 
Cc: mstarzinger@chromium.org
Owner: bmeu...@chromium.org
Status: Assigned (was: Untriaged)
Blocking: v8:5267
Cc: -mstarzinger@chromium.org bmeu...@chromium.org
Labels: -OS-Linux OS-All
Owner: mstarzinger@chromium.org
Reduced repro:

===============================
// Flags: --allow-natives-syntax

var t = 0;
function foo() {
  var o = {x:1};
  var p = {y:2.5, x:0};
  o = [];
  for (var i = 0; i < 2; ++i) {
    t = o.x;
    o = p;
  }
}
foo();
foo();
%OptimizeFunctionOnNextCall(foo);
foo();
===============================

The problem is that there's a LoadField[x] that loads from an offset outside the virtual object, and therefore we don't have a replacement for the LoadField.
Blocking: v8:4586
Cc: -bmeu...@chromium.org mstarzinger@chromium.org
Owner: bmeu...@chromium.org
Status: Started (was: Assigned)
Fixing this as discussed offline last week.
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 31 2016

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

commit 7201bad99d16c0e4e9f33ebc14ddb80446b06a51
Author: bmeurer <bmeurer@chromium.org>
Date: Mon Oct 31 06:43:04 2016

[turbofan] Properly deal with out-of-bounds fields in EscapeAnalysis.

Conflicting type feedback on Load/StoreICs can lead to out-of-bounds
field access, which is essentially dead code, but EscapeAnalysis was
confused about those. For now, mark the objects as escaping in these
cases, middle-term we want to deal better with this kind of compile-
time known dead code.

BUG= chromium:658185 , v8:4586 
R=jarin@chromium.org

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

[modify] https://crrev.com/7201bad99d16c0e4e9f33ebc14ddb80446b06a51/src/compiler/escape-analysis.cc
[add] https://crrev.com/7201bad99d16c0e4e9f33ebc14ddb80446b06a51/test/mjsunit/regress/regress-crbug-658185.js

Status: Fixed (was: Started)
Project Member

Comment 6 by ClusterFuzz, Nov 1 2016

ClusterFuzz has detected this issue as fixed in range 40661:40662.

Detailed report: https://cluster-fuzz.appspot.com/testcase?key=5145103457058816

Fuzzer: mbarbella_js_mutation
Job Type: linux_asan_d8_dbg
Platform Id: linux

Crash Type: CHECK failure
Crash Address: 
Crash State:
  !escape_analysis_->IsVirtual(node) in escape-analysis-reducer.cc
  
Regressed: V8: r40350:40351
Fixed: V8: r40661:40662

Minimized Testcase (0.27 Kb):
Download: https://cluster-fuzz.appspot.com/download/AMIfv9729pwK_Bt_OOjXRf1fxgrv_hyvSAHD7tPoNuVPeCKMUHySwz8n_NC6FvXJz5NT2lU15BUZZ0yMfa7IrdjyLyX86Q4yH-FRkvnpLW5kQR4eWnCwh3aOBvvs3YEzGaZGkCA3kGXbBjMt83pbfOH53ZOPKBECBg?testcase_id=5145103457058816
try {
} catch(e) {; }
function __f_11() {
  var __v_14 = {x:1};
  var __v_11 = {__v_11:2.5, x:0};
  __v_14 = [];
  for (var __v_12 = 0; __v_12 < 2; __v_12++) {
    __v_13 = __v_14.x + 3;
    __v_14 = __v_11;
  }
}
__f_11();
__f_11();
%OptimizeFunctionOnNextCall(__f_11);
 __f_11();


See https://dev.chromium.org/Home/chromium-security/bugs/reproducing-clusterfuzz-bugs for more information.

If you suspect that the result above is incorrect, try re-doing that job on the test case report page.
Project Member

Comment 7 by sheriffbot@chromium.org, Nov 22 2016

Labels: -Restrict-View-EditIssue
Removing EditIssue view restrictions from ClusterFuzz filed bugs. If you believe that this issue should still be restricted, please reapply the label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment