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

Issue 11362158: Reshuffle an if() condition to not depend on an uninitialized value. (Closed)

Created:
8 years, 1 month ago by eugenis
Modified:
8 years, 1 month ago
CC:
v8-dev
Visibility:
Public.

Description

Reshuffle an if() condition to not depend on an uninitialized value. Node::class_id_ contains garbage for newly allocated (FREE) nodes. This patch changes the code to first test the node state_, then (for non-FREE nodes), class_id_, and not the other way around. This does not affect the branch taken (i.e. the current code is correct), but makes Valgrind and MSan happy. Committed: https://code.google.com/p/v8/source/detail?r=12903

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M src/global-handles.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
eugenis
8 years, 1 month ago (2012-11-08 13:05:30 UTC) #1
eugenis
This is causing hard-to-debug issues with Valgrind in Chromium: http://code.google.com/p/chromium/issues/detail?id=102257
8 years, 1 month ago (2012-11-08 13:46:39 UTC) #2
Michael Starzinger
LGTM. I'll land this for you.
8 years, 1 month ago (2012-11-08 14:35:26 UTC) #3
eugenis
8 years, 1 month ago (2012-11-09 08:44:42 UTC) #4
On 2012/11/08 14:35:26, Michael Starzinger wrote:
> LGTM. I'll land this for you.

Thanks.

Powered by Google App Engine
This is Rietveld 408576698