comparison src/share/vm/utilities/vmError.cpp @ 17567:5656140324ed

8030763: Validate global memory allocation Summary: Add length checks where necessary Reviewed-by: coleenp, mschoene
author hseigel
date Thu, 13 Feb 2014 11:28:17 -0500
parents 5cc2d82aa82a
children 3eed8712d410 364b73402247
comparison
equal deleted inserted replaced
17566:bf4dc2e29b5c 17567:5656140324ed
1 /* 1 /*
2 * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
973 // open log file 973 // open log file
974 int fd = prepare_log_file(ErrorFile, "hs_err_pid%p.log", buffer, sizeof(buffer)); 974 int fd = prepare_log_file(ErrorFile, "hs_err_pid%p.log", buffer, sizeof(buffer));
975 if (fd != -1) { 975 if (fd != -1) {
976 out.print_raw("# An error report file with more information is saved as:\n# "); 976 out.print_raw("# An error report file with more information is saved as:\n# ");
977 out.print_raw_cr(buffer); 977 out.print_raw_cr(buffer);
978 os::set_error_file(buffer);
979 978
980 log.set_fd(fd); 979 log.set_fd(fd);
981 } else { 980 } else {
982 out.print_raw_cr("# Can not save log file, dump to screen.."); 981 out.print_raw_cr("# Can not save log file, dump to screen..");
983 log.set_fd(defaultStream::output_fd()); 982 log.set_fd(defaultStream::output_fd());