Port r20458 (
984d99c9)
Oirginal commit message:
This is to avoid triggering an assertion from Smi::FromInt. The
generated code is unreachable, so it is not a real bug.
BUG=
R=plind44@gmail.com
Review URL: https://codereview.chromium.org/
224583002
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20491
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
__ push(size);
} else {
int32_t size = ToInteger32(LConstantOperand::cast(instr->size()));
- __ Push(Smi::FromInt(size));
+ if (size >= 0 && size <= Smi::kMaxValue) {
+ __ Push(Smi::FromInt(size));
+ } else {
+ // We should never get here at runtime => abort
+ __ stop("invalid allocation size");
+ return;
+ }
}
int flags = AllocateDoubleAlignFlag::encode(