Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Thondapu2015-02-04 14:50:57 +0000
committerArun Thondapu2015-02-04 14:50:57 +0000
commitb4a52b45745ed5802ec98526a7de07efb2b57340 (patch)
tree961a77632b6e4fc2e9a8432b7bdf1c8384331175 /features/org.eclipse.equinox.executable.feature
parent177b127016c383123da22f694e4826c60682ee23 (diff)
downloadrt.equinox.framework-b4a52b45745ed5802ec98526a7de07efb2b57340.tar.gz
rt.equinox.framework-b4a52b45745ed5802ec98526a7de07efb2b57340.tar.xz
rt.equinox.framework-b4a52b45745ed5802ec98526a7de07efb2b57340.zip
Bug 458558 - [1.9] --launcher.XXMaxPermSize should not pass
-XX:MaxPermSize= for Oracle VMs >= 8 Patch which improves version checks for Windows Change-Id: I6d90f1d1450510284e5ca8af6140c9a2b55d6957
Diffstat (limited to 'features/org.eclipse.equinox.executable.feature')
-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 cd8806732..475dbf0f7 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