Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Version 4.1.0.22 (cherry-pick)
Browse files Browse the repository at this point in the history
Merged a02d97e as courtesy for io.js.

Fix --max_old_space_size=4096 integer overflow.

BUG=v8:3857
LOG=N
TBR=ben@strongloop.com

Review URL: https://codereview.chromium.org/1009523003

Cr-Commit-Position: refs/branch-heads/4.1@{#24}
Cr-Branched-From: 2e08d2a-refs/heads/candidates@{#25353}
  • Loading branch information
hashseed committed Mar 17, 2015
1 parent 164d5a7 commit 8fe020a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 4
#define V8_MINOR_VERSION 1
#define V8_BUILD_NUMBER 0
#define V8_PATCH_LEVEL 21
#define V8_PATCH_LEVEL 22

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
9 changes: 5 additions & 4 deletions src/heap/heap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5082,21 +5082,22 @@ bool Heap::ConfigureHeap(int max_semi_space_size, int max_old_space_size,
max_semi_space_size_ = max_semi_space_size * MB;
}
if (max_old_space_size > 0) {
max_old_generation_size_ = max_old_space_size * MB;
max_old_generation_size_ = static_cast<intptr_t>(max_old_space_size) * MB;
}
if (max_executable_size > 0) {
max_executable_size_ = max_executable_size * MB;
max_executable_size_ = static_cast<intptr_t>(max_executable_size) * MB;
}

// If max space size flags are specified overwrite the configuration.
if (FLAG_max_semi_space_size > 0) {
max_semi_space_size_ = FLAG_max_semi_space_size * MB;
}
if (FLAG_max_old_space_size > 0) {
max_old_generation_size_ = FLAG_max_old_space_size * MB;
max_old_generation_size_ =
static_cast<intptr_t>(FLAG_max_old_space_size) * MB;
}
if (FLAG_max_executable_size > 0) {
max_executable_size_ = FLAG_max_executable_size * MB;
max_executable_size_ = static_cast<intptr_t>(FLAG_max_executable_size) * MB;
}

if (FLAG_stress_compaction) {
Expand Down

0 comments on commit 8fe020a

Please sign in to comment.