Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
f753c19c
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f753c19c
编写于
9月 04, 2009
作者:
A
alanb
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6432567: PIT : com/sun/jdi/BadHandshakeTest.java fails due to java.net.ConnectException
Reviewed-by: tbell, ohair, dcubed, andrew
上级
2b6d29e0
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
17 deletion
+17
-17
src/share/transport/socket/socketTransport.c
src/share/transport/socket/socketTransport.c
+16
-16
test/com/sun/jdi/BadHandshakeTest.java
test/com/sun/jdi/BadHandshakeTest.java
+1
-1
未找到文件。
src/share/transport/socket/socketTransport.c
浏览文件 @
f753c19c
...
...
@@ -134,15 +134,16 @@ setOptions(int fd)
static
jdwpTransportError
handshake
(
int
fd
,
jlong
timeout
)
{
char
*
hello
=
"JDWP-Handshake"
;
c
onst
c
har
*
hello
=
"JDWP-Handshake"
;
char
b
[
16
];
int
rv
,
received
,
i
;
int
rv
,
helloLen
,
received
;
if
(
timeout
>
0
)
{
dbgsysConfigureBlocking
(
fd
,
JNI_FALSE
);
}
helloLen
=
(
int
)
strlen
(
hello
);
received
=
0
;
while
(
received
<
(
int
)
strlen
(
hello
)
)
{
while
(
received
<
helloLen
)
{
int
n
;
char
*
buf
;
if
(
timeout
>
0
)
{
...
...
@@ -154,7 +155,7 @@ handshake(int fd, jlong timeout) {
}
buf
=
b
;
buf
+=
received
;
n
=
dbgsysRecv
(
fd
,
buf
,
(
int
)
strlen
(
hello
)
-
received
,
0
);
n
=
dbgsysRecv
(
fd
,
buf
,
helloLen
-
received
,
0
);
if
(
n
==
0
)
{
setLastError
(
0
,
"handshake failed - connection prematurally closed"
);
return
JDWPTRANSPORT_ERROR_IO_ERROR
;
...
...
@@ -167,20 +168,19 @@ handshake(int fd, jlong timeout) {
if
(
timeout
>
0
)
{
dbgsysConfigureBlocking
(
fd
,
JNI_TRUE
);
}
for
(
i
=
0
;
i
<
(
int
)
strlen
(
hello
);
i
++
)
{
if
(
b
[
i
]
!=
hello
[
i
])
{
char
msg
[
64
];
strcpy
(
msg
,
"handshake failed - received >"
);
strncat
(
msg
,
b
,
strlen
(
hello
));
strcat
(
msg
,
"< - excepted >"
);
strcat
(
msg
,
hello
);
strcat
(
msg
,
"<"
);
setLastError
(
0
,
msg
);
return
JDWPTRANSPORT_ERROR_IO_ERROR
;
}
if
(
strncmp
(
b
,
hello
,
received
)
!=
0
)
{
char
msg
[
80
+
2
*
16
];
b
[
received
]
=
'\0'
;
/*
* We should really use snprintf here but it's not available on Windows.
* We can't use jio_snprintf without linking the transport against the VM.
*/
sprintf
(
msg
,
"handshake failed - received >%s< - expected >%s<"
,
b
,
hello
);
setLastError
(
0
,
msg
);
return
JDWPTRANSPORT_ERROR_IO_ERROR
;
}
if
(
dbgsysSend
(
fd
,
hello
,
(
int
)
strlen
(
hello
),
0
)
!=
(
int
)
strlen
(
hello
)
)
{
if
(
dbgsysSend
(
fd
,
(
char
*
)
hello
,
helloLen
,
0
)
!=
helloLen
)
{
RETURN_IO_ERROR
(
"send failed during handshake"
);
}
return
JDWPTRANSPORT_ERROR_NONE
;
...
...
test/com/sun/jdi/BadHandshakeTest.java
浏览文件 @
f753c19c
...
...
@@ -22,7 +22,7 @@
*/
/* @test
* @bug 6306165
* @bug 6306165
6432567
* @summary Check that a bad handshake doesn't cause a debuggee to abort
*
* @build VMConnection BadHandshakeTest Exit0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录