Index: src/full-codegen/arm64/full-codegen-arm64.cc |
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc |
index c8023dea97fda3318ac0b758525de87211634acf..c4a4136f63703667a45deee33e5af61b869a8acd 100644 |
--- a/src/full-codegen/arm64/full-codegen-arm64.cc |
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc |
@@ -3961,6 +3961,10 @@ void FullCodeGenerator::EmitFastOneByteArrayJoin(CallRuntime* expr) { |
__ Umaddl(string_length, array_length.W(), separator_length.W(), |
string_length); |
+ // Bailout for large object allocations. |
+ __ Cmp(string_length, Page::kMaxRegularHeapObjectSize); |
+ __ B(gt, &bailout); |
+ |
// Get first element in the array. |
__ Add(element, elements, FixedArray::kHeaderSize - kHeapObjectTag); |
// Live values in registers: |