2009-10-30 17:12:52 +00:00
|
|
|
/*
|
2020-07-17 18:54:14 +00:00
|
|
|
* Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
|
2009-10-30 17:12:52 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
*
|
|
|
|
* This code is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of the GNU General Public License version 2 only, as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* version 2 for more details (a copy is included in the LICENSE file that
|
|
|
|
* accompanied this code).
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License version
|
|
|
|
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*
|
2010-05-28 02:08:38 +00:00
|
|
|
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
|
|
* or visit www.oracle.com if you need additional information or have any
|
|
|
|
* questions.
|
2009-10-30 17:12:52 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @bug 6852078
|
|
|
|
* @summary Disable SuperWord optimization for unsafe read/write
|
2015-03-26 15:36:56 +00:00
|
|
|
* @modules java.corba/com.sun.corba.se.impl.encoding
|
|
|
|
* java.corba/com.sun.jndi.toolkit.corba
|
2016-07-12 15:24:48 +00:00
|
|
|
*
|
2020-07-17 18:54:14 +00:00
|
|
|
* @ignore 8194310
|
2016-07-12 15:24:48 +00:00
|
|
|
* @run main compiler.c2.Test6852078
|
2009-10-30 17:12:52 +00:00
|
|
|
*/
|
|
|
|
|
2016-07-12 15:24:48 +00:00
|
|
|
package compiler.c2;
|
|
|
|
|
2009-10-30 17:12:52 +00:00
|
|
|
import com.sun.corba.se.impl.encoding.ByteBufferWithInfo;
|
|
|
|
import com.sun.jndi.toolkit.corba.CorbaUtils;
|
|
|
|
|
2016-07-12 15:24:48 +00:00
|
|
|
import java.nio.ByteBuffer;
|
|
|
|
import java.util.Hashtable;
|
|
|
|
|
2009-10-30 17:12:52 +00:00
|
|
|
public class Test6852078 {
|
|
|
|
|
|
|
|
public Test6852078(String [] args) {
|
|
|
|
|
|
|
|
int capacity = 128;
|
|
|
|
ByteBuffer bb = ByteBuffer.allocateDirect(capacity);
|
|
|
|
ByteBufferWithInfo bbwi = new ByteBufferWithInfo( CorbaUtils.getOrb(null, -1, new Hashtable()), bb);
|
|
|
|
byte[] tmpBuf;
|
|
|
|
tmpBuf = new byte[bbwi.buflen];
|
|
|
|
|
|
|
|
for (int i = 0; i < capacity; i++)
|
|
|
|
tmpBuf[i] = bbwi.byteBuffer.get(i);
|
|
|
|
}
|
|
|
|
|
|
|
|
public static void main(String [] args) {
|
2013-02-26 23:38:24 +00:00
|
|
|
long start = System.currentTimeMillis();
|
2009-10-30 17:12:52 +00:00
|
|
|
for (int i=0; i<2000; i++) {
|
2013-02-26 23:38:24 +00:00
|
|
|
// To protect slow systems from test-too-long timeouts
|
|
|
|
if ((i > 100) && ((System.currentTimeMillis() - start) > 100000))
|
|
|
|
break;
|
2009-10-30 17:12:52 +00:00
|
|
|
Test6852078 t = new Test6852078(args);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|