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

Issue 12096089: Better fix for MemoryChunk::owner(). (Closed)

Created:
7 years, 10 months ago by hans
Modified:
7 years, 10 months ago
Reviewers:
Jakob Kummerow
CC:
v8-dev
Visibility:
Public.

Description

Better fix for MemoryChunk::owner(). Pointer arithmetic such as "owner_ - kFailureTag" is undefined behaviour unless owner_ points to a valid object. This allowed Clang to assume the subtraction would never be NULL, causing problems in the caller (see https://codereview.chromium.org/12090072/). To fix this, we should cast owner_ to intptr_t before doing the arithmetic. Committed: http://code.google.com/p/v8/source/detail?r=13570

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -10 lines) Patch
M src/spaces.h View 2 chunks +2 lines, -9 lines 0 comments Download
M src/spaces.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 2 (0 generated)
hans
Jakob: PTAL
7 years, 10 months ago (2013-01-31 15:25:22 UTC) #1
Jakob Kummerow
7 years, 10 months ago (2013-01-31 15:29:57 UTC) #2
LGTM!

Thanks for investigating this, and also thanks for teaching me some C++!

Powered by Google App Engine
This is Rietveld 408576698