< prev index next >

test/runtime/ErrorHandling/SafeFetchInErrorHandlingTest.java

Print this page




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.io.BufferedReader;
  25 import java.io.File;
  26 import java.io.FileInputStream;
  27 import java.io.InputStreamReader;
  28 import java.util.regex.Pattern;
  29 
  30 import jdk.test.lib.OutputAnalyzer;
  31 import jdk.test.lib.Platform;
  32 import jdk.test.lib.ProcessTools;
  33 
  34 /*
  35  * @test
  36  * @bug 8074552
  37  * @summary SafeFetch32 and SafeFetchN do not work in error handling
  38  * @modules java.base/jdk.internal.misc
  39  * @library /testlibrary
  40  * @author Thomas Stuefe (SAP)
  41  */
  42 
  43 public class SafeFetchInErrorHandlingTest {
  44 
  45 
  46   public static void main(String[] args) throws Exception {
  47 
  48     if (!Platform.isDebugBuild() || Platform.isZero()) {
  49       return;
  50     }
  51 
  52     ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
  53         "-XX:+UnlockDiagnosticVMOptions",
  54         "-Xmx100M",
  55         "-XX:ErrorHandlerTest=14",
  56         "-XX:+TestSafeFetchInErrorHandler",
  57         "-XX:-CreateCoredumpOnCrash",
  58         "-version");
  59 




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import java.io.BufferedReader;
  25 import java.io.File;
  26 import java.io.FileInputStream;
  27 import java.io.InputStreamReader;
  28 import java.util.regex.Pattern;
  29 
  30 import jdk.test.lib.process.OutputAnalyzer;
  31 import jdk.test.lib.Platform;
  32 import jdk.test.lib.process.ProcessTools;
  33 
  34 /*
  35  * @test
  36  * @bug 8074552
  37  * @summary SafeFetch32 and SafeFetchN do not work in error handling
  38  * @modules java.base/jdk.internal.misc
  39  * @library /test/lib
  40  * @author Thomas Stuefe (SAP)
  41  */
  42 
  43 public class SafeFetchInErrorHandlingTest {
  44 
  45 
  46   public static void main(String[] args) throws Exception {
  47 
  48     if (!Platform.isDebugBuild() || Platform.isZero()) {
  49       return;
  50     }
  51 
  52     ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
  53         "-XX:+UnlockDiagnosticVMOptions",
  54         "-Xmx100M",
  55         "-XX:ErrorHandlerTest=14",
  56         "-XX:+TestSafeFetchInErrorHandler",
  57         "-XX:-CreateCoredumpOnCrash",
  58         "-version");
  59 


< prev index next >