mirror of
				https://github.com/tc39/test262.git
				synced 2025-10-31 19:53:50 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			480 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			480 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| // Copyright 2017 the V8 project authors. All rights reserved.
 | |
| // Use of this source code is governed by a BSD-style license that can be
 | |
| // found in the LICENSE file.
 | |
| 
 | |
| // This test gets very slow with slow asserts.
 | |
| // Flags: --noenable-slow-asserts
 | |
| 
 | |
| try {
 | |
|   var a = 'a'.repeat(1 << 28);
 | |
| } catch (e) {
 | |
|   // If the allocation fails, we don't care, because we can't cause the
 | |
|   // overflow.
 | |
| }
 | |
| // Cause an overflow in worst-case calculation for string replacement.
 | |
| JSON.stringify(a);
 |