From b4a52b45745ed5802ec98526a7de07efb2b57340 Mon Sep 17 00:00:00 2001 From: Arun Thondapu Date: Wed, 4 Feb 2015 20:20:57 +0530 Subject: 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 --- .../library/win32/eclipseWin.c | 7 +++++-- 1 file 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; -- cgit v1.2.3