Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Thondapu2015-02-04 12:20:51 +0000
committerArun Thondapu2015-02-04 12:20:51 +0000
commitec17da7b783721dc8e38ae3e557ca23cdf59127c (patch)
tree3367587233995c1319fe624aea51be391a13c5c5
parent0fb3c51737c468e0f5e76a1c956f9e96c3efaea7 (diff)
downloadrt.equinox.framework-ec17da7b783721dc8e38ae3e557ca23cdf59127c.tar.gz
rt.equinox.framework-ec17da7b783721dc8e38ae3e557ca23cdf59127c.tar.xz
rt.equinox.framework-ec17da7b783721dc8e38ae3e557ca23cdf59127c.zip
Bug 449990 - [1.9] --launcher.XXMaxPermSize should not pass
-XX:MaxPermSize= for Oracle VMs >= 8 Patch with improved version checks for Windows Change-Id: Ib7898940ff2cea1c8d913ccfee209883a152e63d
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/win32/eclipseWin.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/library/win32/eclipseWin.c b/features/org.eclipse.equinox.executable.feature/library/win32/eclipseWin.c
index f74fd6c04..65be28d89 100644
--- a/features/org.eclipse.equinox.executable.feature/library/win32/eclipseWin.c
+++ b/features/org.eclipse.equinox.executable.feature/library/win32/eclipseWin.c
@@ -585,7 +585,7 @@ int isMaxPermSizeVM( _TCHAR * javaVM, _TCHAR * jniLib ) {
DWORD handle;
void * info;
- _TCHAR *key, *value, *versionKey, *version;
+ _TCHAR *key, *value, *versionKey, *version, *majorVersion = NULL;
size_t i;
int valueSize, versionSize;
@@ -610,7 +610,10 @@ int isMaxPermSizeVM( _TCHAR * javaVM, _TCHAR * jniLib ) {
if ((_tcsncmp(value, SUN_MICROSYSTEMS, _tcslen(SUN_MICROSYSTEMS)) == 0) || (_tcsncmp(value, ORACLE, _tcslen(ORACLE)) == 0)) {
_stprintf(versionKey, PRODUCT_VERSION_KEY, translations[i].language, translations[i].codepage);
VerQueryValue(info, versionKey, (void *)&version, &versionSize);
- if ((version[0] - '0') < 8) {
+ if (versionSize > 1) {
+ majorVersion = _tcstok(version, ".");
+ }
+ if ((majorVersion != NULL) && (_tcstol(majorVersion, NULL, 10) < 8)) {
result = 1;
}
break;

Back to the top