test/script/basic/JDK-8066220.js

Tue, 15 Jan 2019 10:36:25 +0000

author
aefimov
date
Tue, 15 Jan 2019 10:36:25 +0000
changeset 2462
e9169a96a3d1
parent 1393
dcbf5e2121e3
permissions
-rw-r--r--

Added tag jdk8u202-ga for changeset 7aeae6eb6236

hannesw@1393 1 /*
hannesw@1393 2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
hannesw@1393 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
hannesw@1393 4 *
hannesw@1393 5 * This code is free software; you can redistribute it and/or modify it
hannesw@1393 6 * under the terms of the GNU General Public License version 2 only, as
hannesw@1393 7 * published by the Free Software Foundation.
hannesw@1393 8 *
hannesw@1393 9 * This code is distributed in the hope that it will be useful, but WITHOUT
hannesw@1393 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
hannesw@1393 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
hannesw@1393 12 * version 2 for more details (a copy is included in the LICENSE file that
hannesw@1393 13 * accompanied this code).
hannesw@1393 14 *
hannesw@1393 15 * You should have received a copy of the GNU General Public License version
hannesw@1393 16 * 2 along with this work; if not, write to the Free Software Foundation,
hannesw@1393 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
hannesw@1393 18 *
hannesw@1393 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
hannesw@1393 20 * or visit www.oracle.com if you need additional information or have any
hannesw@1393 21 * questions.
hannesw@1393 22 */
hannesw@1393 23
hannesw@1393 24 /**
hannesw@1393 25 * JDK-8066220: Fuzzing bug: MethodHandle bug (Object,Object) != (boolean)Object
hannesw@1393 26 *
hannesw@1393 27 * @test
hannesw@1393 28 * @run
hannesw@1393 29 */
hannesw@1393 30
hannesw@1393 31
hannesw@1393 32 function f() {}
hannesw@1393 33 // Call f with primitive this first, then as constructor
hannesw@1393 34 f.call(1);
hannesw@1393 35 new f();
hannesw@1393 36
hannesw@1393 37 // Same as above in strict mode
hannesw@1393 38 eval('"use strict"; function e() { print(typeof this); } e.call(1); new e();');

mercurial