summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/regress/regress-crbug-902395.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/mjsunit/regress/regress-crbug-902395.js')
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-902395.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-902395.js b/deps/v8/test/mjsunit/regress/regress-crbug-902395.js
new file mode 100644
index 0000000000..79aaecf6fa
--- /dev/null
+++ b/deps/v8/test/mjsunit/regress/regress-crbug-902395.js
@@ -0,0 +1,37 @@
+// Copyright 2018 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.
+
+// Flags: --allow-natives-syntax
+
+function opt() {
+ try{
+ Object.seal({})
+ }finally{
+ try{
+ // Carefully crafted by clusterfuzz to alias the temporary object literal
+ // register with the below dead try block's context register.
+ (
+ {
+ toString(){
+ }
+ }
+ ).apply(-1).x( )
+ }
+ finally{
+ if(2.2)
+ {
+ return
+ }
+ // This code should be dead.
+ try{
+ Reflect.construct
+ }finally{
+ }
+ }
+ }
+}
+
+opt();
+%OptimizeFunctionOnNextCall(opt);
+opt();