Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(125)

Issue 1303093004: Fix a segment-fault caused by Value::IntegerValue

Created:
5 years, 3 months ago by P.S.V.R
Modified:
5 years, 3 months ago
CC:
v8-dev
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Fix a segment-fault caused by Value::IntegerValue First discovered in a Node.js bug, cf. [1] and [2]. Handle zapping helps exposing this bug in Release builds while hiding it in Debug. (Thank you indutny<fedor@indutny.com>; and skomski<mail@skomski.com>; for the detail.) The macros hide it but PREPARE_FOR_EXECUTION_PRIMITIVE is basically a scoped operation. Outside the else block, num is no longer rooted. (Thank you bnoordhuis<ben@strongloop.com>; for the detail.) [1] https://github.com/nodejs/node/issues/2721 [2] https://github.com/nodejs/node/pull/2722 TEST=tools/run-tests.py --arch-and-mode=x64.release cctest/test-api/NoSegmentationFault

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -2 lines) Patch
M AUTHORS View 1 chunk +1 line, -0 lines 0 comments Download
M src/api.cc View 1 chunk +4 lines, -2 lines 2 comments Download
M test/cctest/test-api.cc View 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (4 generated)
P.S.V.R
Fix a segment-fault caused by Value::IntegerValue First discovered in a Node.js bug, cf. [1] and ...
5 years, 3 months ago (2015-09-08 09:12:57 UTC) #3
Michael Achenbach
Please find more appropriate owner-reviewers.
5 years, 3 months ago (2015-09-09 10:43:52 UTC) #5
jochen (gone - plz use gerrit)
thanks for the fix https://codereview.chromium.org/1303093004/diff/1/src/api.cc File src/api.cc (right): https://codereview.chromium.org/1303093004/diff/1/src/api.cc#newcode3271 src/api.cc:3271: has_pending_exception = can you pull ...
5 years, 3 months ago (2015-09-09 14:16:59 UTC) #6
noordhuis
https://codereview.chromium.org/1303093004/diff/1/src/api.cc File src/api.cc (right): https://codereview.chromium.org/1303093004/diff/1/src/api.cc#newcode3271 src/api.cc:3271: has_pending_exception = On 2015/09/09 14:16:59, jochen wrote: > can ...
5 years, 3 months ago (2015-09-09 23:35:56 UTC) #8
jochen (gone - plz use gerrit)
5 years, 3 months ago (2015-09-16 07:24:55 UTC) #9
On 2015/09/09 at 23:35:56, info wrote:
> https://codereview.chromium.org/1303093004/diff/1/src/api.cc
> File src/api.cc (right):
> 
> https://codereview.chromium.org/1303093004/diff/1/src/api.cc#newcode3271
> src/api.cc:3271: has_pending_exception =
> On 2015/09/09 14:16:59, jochen wrote:
> > can you pull the if() case in here instead of duplicating the returns?
> > 
> > something like
> > 
> > PREPARE_FOR...
> > if (obj->isNumber())
> >  num = obj;
> > else {
> >  has_pending = ...
> 
> That pessimizes the common case when the input is a SMI or double. 
PREPARE_FOR_EXECUTION_PRIMITIVE mutates a couple of per-isolate data structures
and is fairly heavy-weight.

yeah, that's true

lgtm then

Powered by Google App Engine
This is Rietveld 408576698