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

Issue 10918071: Check the return value of API calls on ia32 and x64. (Closed)

Created:
8 years, 3 months ago by Sven Panne
Modified:
8 years, 3 months ago
Reviewers:
Jakob Kummerow
CC:
v8-dev
Visibility:
Public.

Description

Check the return value of API calls on ia32 and x64. This implies that the return value of native getters is checked. The nice part is that one can even see the name of the property in question in the abort output when the check failed. Under some circumstances even the return value of interceptors gets checked, but I'm not 100% sure about this, because the interceptor code is basically tuned to death. The change seems to have very low overhead, so it might be feasible to keep this check enabled unconditionally. Committed: https://code.google.com/p/v8/source/detail?r=12446

Patch Set 1 #

Total comments: 2

Patch Set 2 : Do checks in the miss case, too #

Total comments: 2

Patch Set 3 : Use correct guard. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -1 line) Patch
M src/ia32/macro-assembler-ia32.cc View 1 chunk +36 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 1 chunk +14 lines, -1 line 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 1 chunk +35 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Sven Panne
8 years, 3 months ago (2012-09-05 13:04:20 UTC) #1
Jakob Kummerow
patch set 3 LGTM. http://codereview.chromium.org/10918071/diff/1/src/ia32/macro-assembler-ia32.cc File src/ia32/macro-assembler-ia32.cc (right): http://codereview.chromium.org/10918071/diff/1/src/ia32/macro-assembler-ia32.cc#newcode1961 src/ia32/macro-assembler-ia32.cc:1961: cmp(return_value, isolate()->factory()->undefined_value()); I guess you ...
8 years, 3 months ago (2012-09-05 14:08:51 UTC) #2
Sven Panne
8 years, 3 months ago (2012-09-05 14:11:47 UTC) #3
Landing...

http://codereview.chromium.org/10918071/diff/1/src/ia32/macro-assembler-ia32.cc
File src/ia32/macro-assembler-ia32.cc (right):

http://codereview.chromium.org/10918071/diff/1/src/ia32/macro-assembler-ia32....
src/ia32/macro-assembler-ia32.cc:1961: cmp(return_value,
isolate()->factory()->undefined_value());
On 2012/09/05 14:08:51, Jakob wrote:
> I guess you don't want to do a CmpInstanceType(map, ODDBALL_TYPE) because you
> want to exclude the hole from valid values, right?

Yes, and things are stricter this way, because somebody could construct an odd
Oddball. :-)

http://codereview.chromium.org/10918071/diff/2002/src/objects.cc
File src/objects.cc (right):

http://codereview.chromium.org/10918071/diff/2002/src/objects.cc#newcode214
src/objects.cc:214: #if 1
On 2012/09/05 14:08:51, Jakob wrote:
> #if ENABLE_EXTRA_CHECKS maybe?

Done.

Powered by Google App Engine
This is Rietveld 408576698