Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
afe8749a
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
3
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
afe8749a
编写于
3月 04, 2015
作者:
K
ksrini
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8073773: Presume path preparedness
Reviewed-by: darcy, dholmes, ahgross
上级
09163ade
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
25 addition
and
7 deletion
+25
-7
src/macosx/bin/java_md_macosx.c
src/macosx/bin/java_md_macosx.c
+5
-1
src/solaris/bin/java_md_solinux.c
src/solaris/bin/java_md_solinux.c
+14
-4
src/windows/bin/java_md.c
src/windows/bin/java_md.c
+6
-2
未找到文件。
src/macosx/bin/java_md_macosx.c
浏览文件 @
afe8749a
...
...
@@ -616,7 +616,11 @@ GetJREPath(char *path, jint pathsize, const char * arch, jboolean speculative)
if
(
access
(
libjava
,
F_OK
)
==
0
)
{
return
JNI_TRUE
;
}
/* ensure storage for path + /jre + NULL */
if
((
JLI_StrLen
(
path
)
+
4
+
1
)
>
pathsize
)
{
JLI_TraceLauncher
(
"Insufficient space to store JRE path
\n
"
);
return
JNI_FALSE
;
}
/* Does the app ship a private JRE in <apphome>/jre directory? */
JLI_Snprintf
(
libjava
,
sizeof
(
libjava
),
"%s/jre/lib/"
JAVA_DLL
,
path
);
if
(
access
(
libjava
,
F_OK
)
==
0
)
{
...
...
src/solaris/bin/java_md_solinux.c
浏览文件 @
afe8749a
/*
* Copyright (c) 1998, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 201
5
, 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
...
...
@@ -613,13 +613,14 @@ CreateExecutionEnvironment(int *pargc, char ***pargv,
/* runpath contains current effective LD_LIBRARY_PATH setting */
jvmpath
=
JLI_StringDup
(
jvmpath
);
new_runpath
=
JLI_MemAlloc
(
((
runpath
!=
NULL
)
?
JLI_StrLen
(
runpath
)
:
0
)
+
size_t
new_runpath_size
=
((
runpath
!=
NULL
)
?
JLI_StrLen
(
runpath
)
:
0
)
+
2
*
JLI_StrLen
(
jrepath
)
+
2
*
JLI_StrLen
(
arch
)
+
#ifdef AIX
/* On AIX we additionally need 'jli' in the path because ld doesn't support $ORIGIN. */
JLI_StrLen
(
jrepath
)
+
JLI_StrLen
(
arch
)
+
JLI_StrLen
(
"/lib//jli:"
)
+
#endif
JLI_StrLen
(
jvmpath
)
+
52
);
JLI_StrLen
(
jvmpath
)
+
52
;
new_runpath
=
JLI_MemAlloc
(
new_runpath_size
);
newpath
=
new_runpath
+
JLI_StrLen
(
LD_LIBRARY_PATH
"="
);
...
...
@@ -679,6 +680,11 @@ CreateExecutionEnvironment(int *pargc, char ***pargv,
* loop of execv() because we test for the prefix, above.
*/
if
(
runpath
!=
0
)
{
/* ensure storage for runpath + colon + NULL */
if
((
JLI_StrLen
(
runpath
)
+
1
+
1
)
>
new_runpath_size
)
{
JLI_ReportErrorMessageSys
(
JRE_ERROR11
);
exit
(
1
);
}
JLI_StrCat
(
new_runpath
,
":"
);
JLI_StrCat
(
new_runpath
,
runpath
);
}
...
...
@@ -811,7 +817,11 @@ GetJREPath(char *path, jint pathsize, const char * arch, jboolean speculative)
JLI_TraceLauncher
(
"JRE path is %s
\n
"
,
path
);
return
JNI_TRUE
;
}
/* ensure storage for path + /jre + NULL */
if
((
JLI_StrLen
(
path
)
+
4
+
1
)
>
pathsize
)
{
JLI_TraceLauncher
(
"Insufficient space to store JRE path
\n
"
);
return
JNI_FALSE
;
}
/* Does the app ship a private JRE in <apphome>/jre directory? */
JLI_Snprintf
(
libjava
,
sizeof
(
libjava
),
"%s/jre/lib/%s/"
JAVA_DLL
,
path
,
arch
);
if
(
access
(
libjava
,
F_OK
)
==
0
)
{
...
...
src/windows/bin/java_md.c
浏览文件 @
afe8749a
/*
* Copyright (c) 1997, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
5
, 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
...
...
@@ -318,7 +318,11 @@ GetJREPath(char *path, jint pathsize)
JLI_TraceLauncher
(
"JRE path is %s
\n
"
,
path
);
return
JNI_TRUE
;
}
/* ensure storage for path + \jre + NULL */
if
((
JLI_StrLen
(
path
)
+
4
+
1
)
>
pathsize
)
{
JLI_TraceLauncher
(
"Insufficient space to store JRE path
\n
"
);
return
JNI_FALSE
;
}
/* Does this app ship a private JRE in <apphome>\jre directory? */
JLI_Snprintf
(
javadll
,
sizeof
(
javadll
),
"%s
\\
jre
\\
bin
\\
"
JAVA_DLL
,
path
);
if
(
stat
(
javadll
,
&
s
)
==
0
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录