Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
3e0b31ef
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3e0b31ef
编写于
7月 01, 2013
作者:
F
fparain
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7060111: race condition in VMError::report_and_die()
Reviewed-by: zgu, coleenp Contributed-by: volker.simonis@gmail.com
上级
f14bfa3b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
10 deletion
+13
-10
src/share/vm/utilities/vmError.cpp
src/share/vm/utilities/vmError.cpp
+9
-9
src/share/vm/utilities/vmError.hpp
src/share/vm/utilities/vmError.hpp
+4
-1
未找到文件。
src/share/vm/utilities/vmError.cpp
浏览文件 @
3e0b31ef
/*
/*
* Copyright (c) 2003, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -799,6 +799,14 @@ void VMError::report(outputStream* st) {
...
@@ -799,6 +799,14 @@ void VMError::report(outputStream* st) {
VMError
*
volatile
VMError
::
first_error
=
NULL
;
VMError
*
volatile
VMError
::
first_error
=
NULL
;
volatile
jlong
VMError
::
first_error_tid
=
-
1
;
volatile
jlong
VMError
::
first_error_tid
=
-
1
;
// An error could happen before tty is initialized or after it has been
// destroyed. Here we use a very simple unbuffered fdStream for printing.
// Only out.print_raw() and out.print_raw_cr() should be used, as other
// printing methods need to allocate large buffer on stack. To format a
// string, use jio_snprintf() with a static buffer or use staticBufferStream.
fdStream
VMError
::
out
(
defaultStream
::
output_fd
());
fdStream
VMError
::
log
;
// error log used by VMError::report_and_die()
/** Expand a pattern into a buffer starting at pos and open a file using constructed path */
/** Expand a pattern into a buffer starting at pos and open a file using constructed path */
static
int
expand_and_open
(
const
char
*
pattern
,
char
*
buf
,
size_t
buflen
,
size_t
pos
)
{
static
int
expand_and_open
(
const
char
*
pattern
,
char
*
buf
,
size_t
buflen
,
size_t
pos
)
{
int
fd
=
-
1
;
int
fd
=
-
1
;
...
@@ -853,13 +861,6 @@ void VMError::report_and_die() {
...
@@ -853,13 +861,6 @@ void VMError::report_and_die() {
// Don't allocate large buffer on stack
// Don't allocate large buffer on stack
static
char
buffer
[
O_BUFLEN
];
static
char
buffer
[
O_BUFLEN
];
// An error could happen before tty is initialized or after it has been
// destroyed. Here we use a very simple unbuffered fdStream for printing.
// Only out.print_raw() and out.print_raw_cr() should be used, as other
// printing methods need to allocate large buffer on stack. To format a
// string, use jio_snprintf() with a static buffer or use staticBufferStream.
static
fdStream
out
(
defaultStream
::
output_fd
());
// How many errors occurred in error handler when reporting first_error.
// How many errors occurred in error handler when reporting first_error.
static
int
recursive_error_count
;
static
int
recursive_error_count
;
...
@@ -868,7 +869,6 @@ void VMError::report_and_die() {
...
@@ -868,7 +869,6 @@ void VMError::report_and_die() {
static
bool
out_done
=
false
;
// done printing to standard out
static
bool
out_done
=
false
;
// done printing to standard out
static
bool
log_done
=
false
;
// done saving error log
static
bool
log_done
=
false
;
// done saving error log
static
bool
transmit_report_done
=
false
;
// done error reporting
static
bool
transmit_report_done
=
false
;
// done error reporting
static
fdStream
log
;
// error log
// disble NMT to avoid further exception
// disble NMT to avoid further exception
MemTracker
::
shutdown
(
MemTracker
::
NMT_error_reporting
);
MemTracker
::
shutdown
(
MemTracker
::
NMT_error_reporting
);
...
...
src/share/vm/utilities/vmError.hpp
浏览文件 @
3e0b31ef
/*
/*
* Copyright (c) 2003, 201
2
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -96,6 +96,9 @@ class VMError : public StackObj {
...
@@ -96,6 +96,9 @@ class VMError : public StackObj {
return
(
id
!=
OOM_MALLOC_ERROR
)
&&
(
id
!=
OOM_MMAP_ERROR
);
return
(
id
!=
OOM_MALLOC_ERROR
)
&&
(
id
!=
OOM_MMAP_ERROR
);
}
}
static
fdStream
out
;
static
fdStream
log
;
// error log used by VMError::report_and_die()
public:
public:
// Constructor for crashes
// Constructor for crashes
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录