Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
c05a9733
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看板
提交
c05a9733
编写于
10月 06, 2016
作者:
J
jdv
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8162461: Hang due to JNI up-call made whilst holding JNI critical lock
Reviewed-by: prr, aghaisas
上级
d0c48fa3
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
61 addition
and
26 deletion
+61
-26
src/share/native/sun/awt/image/jpeg/imageioJPEG.c
src/share/native/sun/awt/image/jpeg/imageioJPEG.c
+61
-26
未找到文件。
src/share/native/sun/awt/image/jpeg/imageioJPEG.c
浏览文件 @
c05a9733
/*
* Copyright (c) 2000, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 201
6
, 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
...
...
@@ -569,13 +569,26 @@ sun_jpeg_output_message (j_common_ptr cinfo)
theObject
=
data
->
imageIOobj
;
if
(
cinfo
->
is_decompressor
)
{
struct
jpeg_source_mgr
*
src
=
((
j_decompress_ptr
)
cinfo
)
->
src
;
RELEASE_ARRAYS
(
env
,
data
,
src
->
next_input_byte
);
(
*
env
)
->
CallVoidMethod
(
env
,
theObject
,
JPEGImageReader_warningWithMessageID
,
string
);
if
((
*
env
)
->
ExceptionOccurred
(
env
)
||
!
GET_ARRAYS
(
env
,
data
,
&
(
src
->
next_input_byte
)))
{
cinfo
->
err
->
error_exit
(
cinfo
);
}
}
else
{
struct
jpeg_destination_mgr
*
dest
=
((
j_compress_ptr
)
cinfo
)
->
dest
;
RELEASE_ARRAYS
(
env
,
data
,
(
const
JOCTET
*
)(
dest
->
next_output_byte
));
(
*
env
)
->
CallVoidMethod
(
env
,
theObject
,
JPEGImageWriter_warningWithMessageID
,
string
);
if
((
*
env
)
->
ExceptionOccurred
(
env
)
||
!
GET_ARRAYS
(
env
,
data
,
(
const
JOCTET
**
)(
&
dest
->
next_output_byte
)))
{
cinfo
->
err
->
error_exit
(
cinfo
);
}
}
}
...
...
@@ -1043,6 +1056,7 @@ imageio_fill_suspended_buffer(j_decompress_ptr cinfo)
if
(
!
GET_ARRAYS
(
env
,
data
,
&
(
src
->
next_input_byte
)))
{
cinfo
->
err
->
error_exit
((
j_common_ptr
)
cinfo
);
}
RELEASE_ARRAYS
(
env
,
data
,
src
->
next_input_byte
);
return
;
}
...
...
@@ -1798,9 +1812,14 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImageHeader
cinfo
->
out_color_space
,
cinfo
->
num_components
,
profileData
);
if
((
*
env
)
->
ExceptionOccurred
(
env
)
||
!
GET_ARRAYS
(
env
,
data
,
&
(
src
->
next_input_byte
)))
{
cinfo
->
err
->
error_exit
((
j_common_ptr
)
cinfo
);
}
if
(
reset
)
{
jpeg_abort_decompress
(
cinfo
);
}
RELEASE_ARRAYS
(
env
,
data
,
src
->
next_input_byte
);
}
return
retval
;
...
...
@@ -2011,6 +2030,7 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage
jpeg_start_decompress
(
cinfo
);
if
(
numBands
!=
cinfo
->
output_components
)
{
RELEASE_ARRAYS
(
env
,
data
,
src
->
next_input_byte
);
JNU_ThrowByName
(
env
,
"javax/imageio/IIOException"
,
"Invalid argument to native readImage"
);
return
data
->
abortFlag
;
...
...
@@ -2019,6 +2039,7 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage
if
(
cinfo
->
output_components
<=
0
||
cinfo
->
image_width
>
(
0xffffffffu
/
(
unsigned
int
)
cinfo
->
output_components
))
{
RELEASE_ARRAYS
(
env
,
data
,
src
->
next_input_byte
);
JNU_ThrowByName
(
env
,
"javax/imageio/IIOException"
,
"Invalid number of output components"
);
return
data
->
abortFlag
;
...
...
@@ -2042,15 +2063,24 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage
// the first interesting pass.
jpeg_start_output
(
cinfo
,
cinfo
->
input_scan_number
);
if
(
wantUpdates
)
{
RELEASE_ARRAYS
(
env
,
data
,
src
->
next_input_byte
);
(
*
env
)
->
CallVoidMethod
(
env
,
this
,
JPEGImageReader_passStartedID
,
cinfo
->
input_scan_number
-
1
);
if
((
*
env
)
->
ExceptionOccurred
(
env
)
||
!
GET_ARRAYS
(
env
,
data
,
&
(
src
->
next_input_byte
)))
{
cinfo
->
err
->
error_exit
((
j_common_ptr
)
cinfo
);
}
}
}
else
if
(
wantUpdates
)
{
RELEASE_ARRAYS
(
env
,
data
,
src
->
next_input_byte
);
(
*
env
)
->
CallVoidMethod
(
env
,
this
,
JPEGImageReader_passStartedID
,
0
);
if
((
*
env
)
->
ExceptionOccurred
(
env
)
||
!
GET_ARRAYS
(
env
,
data
,
&
(
src
->
next_input_byte
)))
{
cinfo
->
err
->
error_exit
((
j_common_ptr
)
cinfo
);
}
}
// Skip until the first interesting line
...
...
@@ -2138,8 +2168,13 @@ Java_com_sun_imageio_plugins_jpeg_JPEGImageReader_readImage
done
=
TRUE
;
}
if
(
wantUpdates
)
{
RELEASE_ARRAYS
(
env
,
data
,
src
->
next_input_byte
);
(
*
env
)
->
CallVoidMethod
(
env
,
this
,
JPEGImageReader_passCompleteID
);
if
((
*
env
)
->
ExceptionOccurred
(
env
)
||
!
GET_ARRAYS
(
env
,
data
,
&
(
src
->
next_input_byte
)))
{
cinfo
->
err
->
error_exit
((
j_common_ptr
)
cinfo
);
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录