| Index: src/arm/lithium-codegen-arm.cc
|
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
|
| index 63e60ba66b00a11c106d4dee938fcdf0c316e07c..e30b25b58691273ccb210fdaa30dc560283c86ce 100644
|
| --- a/src/arm/lithium-codegen-arm.cc
|
| +++ b/src/arm/lithium-codegen-arm.cc
|
| @@ -5357,7 +5357,13 @@ void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
|
| __ 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(
|
|
|