Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
e6acda66
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看板
提交
e6acda66
编写于
2月 14, 2019
作者:
M
mikael
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8218935: Make jfr strncpy uses GCC 8.x friendly
Reviewed-by: clanger
上级
5d53bb0d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
14 deletion
+9
-14
src/share/vm/jfr/recorder/checkpoint/types/jfrThreadGroup.cpp
...share/vm/jfr/recorder/checkpoint/types/jfrThreadGroup.cpp
+3
-4
src/share/vm/jfr/recorder/repository/jfrChunkState.cpp
src/share/vm/jfr/recorder/repository/jfrChunkState.cpp
+2
-3
src/share/vm/jfr/recorder/repository/jfrRepository.cpp
src/share/vm/jfr/recorder/repository/jfrRepository.cpp
+4
-7
未找到文件。
src/share/vm/jfr/recorder/checkpoint/types/jfrThreadGroup.cpp
浏览文件 @
e6acda66
/*
* Copyright (c) 2016, 201
8
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 201
9
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -238,9 +238,8 @@ void JfrThreadGroup::JfrThreadGroupEntry::set_thread_group_name(const char* tgna
assert
(
_thread_group_name
==
NULL
,
"invariant"
);
if
(
tgname
!=
NULL
)
{
size_t
len
=
strlen
(
tgname
);
_thread_group_name
=
JfrCHeapObj
::
new_array
<
char
>
(
len
+
1
);
strncpy
(
_thread_group_name
,
tgname
,
len
);
_thread_group_name
[
len
]
=
'\0'
;
_thread_group_name
=
JfrCHeapObj
::
new_array
<
char
>
(
len
+
1
);
strncpy
(
_thread_group_name
,
tgname
,
len
+
1
);
}
}
...
...
src/share/vm/jfr/recorder/repository/jfrChunkState.cpp
浏览文件 @
e6acda66
/*
* Copyright (c) 2012, 201
8
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 201
9
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -99,8 +99,7 @@ static char* copy_path(const char* path) {
assert
(
path
!=
NULL
,
"invariant"
);
const
size_t
path_len
=
strlen
(
path
);
char
*
new_path
=
JfrCHeapObj
::
new_array
<
char
>
(
path_len
+
1
);
strncpy
(
new_path
,
path
,
path_len
);
new_path
[
path_len
]
=
'\0'
;
strncpy
(
new_path
,
path
,
path_len
+
1
);
return
new_path
;
}
...
...
src/share/vm/jfr/recorder/repository/jfrRepository.cpp
浏览文件 @
e6acda66
/*
* Copyright (c) 2011, 201
8
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 201
9
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -209,8 +209,7 @@ const char* const RepositoryIterator::filter(const char* entry) const {
if
(
entry_name
==
NULL
)
{
return
NULL
;
}
strncpy
(
entry_name
,
entry
,
entry_len
);
entry_name
[
entry_len
]
=
'\0'
;
strncpy
(
entry_name
,
entry
,
entry_len
+
1
);
const
char
*
const
fully_qualified_path_entry
=
fully_qualified
(
entry_name
);
if
(
NULL
==
fully_qualified_path_entry
)
{
return
NULL
;
...
...
@@ -332,8 +331,7 @@ static const char* create_emergency_dump_path() {
if
(
NULL
==
emergency_dump_path
)
{
return
NULL
;
}
strncpy
(
emergency_dump_path
,
buffer
,
emergency_filename_length
);
emergency_dump_path
[
emergency_filename_length
]
=
'\0'
;
strncpy
(
emergency_dump_path
,
buffer
,
emergency_filename_length
+
1
);
}
return
emergency_dump_path
;
}
...
...
@@ -407,8 +405,7 @@ bool JfrRepository::set_path(const char* path) {
if
(
_path
==
NULL
)
{
return
false
;
}
strncpy
(
_path
,
path
,
path_len
);
_path
[
path_len
]
=
'\0'
;
strncpy
(
_path
,
path
,
path_len
+
1
);
return
true
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录