wrapper 

Commit MetaInfo

Revision156 (tree)
Time2011-11-02 11:14:17
Authormortenson

Log Message

Prepare for 3.5.13 release.

Change Summary

Diff

--- trunk/wrapper/README_es.txt (revision 155)
+++ trunk/wrapper/README_es.txt (revision 156)
@@ -1,5 +1,5 @@
11 -----------------------------------------------------------------------------
2-Java Service Wrapper Community Edition 3.5.12
2+Java Service Wrapper Community Edition 3.5.13
33 Copyright (C) 1999-2011 Tanuki Software, Ltd. All Rights Reserved.
44 http://wrapper.tanukisoftware.com
55 -----------------------------------------------------------------------------
--- trunk/wrapper/README_de.txt (revision 155)
+++ trunk/wrapper/README_de.txt (revision 156)
@@ -1,5 +1,5 @@
11 -----------------------------------------------------------------------------
2-Java Service Wrapper Community Edition 3.5.12
2+Java Service Wrapper Community Edition 3.5.13
33 Copyright (C) 1999-2011 Tanuki Software, Ltd. All Rights Reserved.
44 http://wrapper.tanukisoftware.com
55 -----------------------------------------------------------------------------
--- trunk/wrapper/README_ja.txt (revision 155)
+++ trunk/wrapper/README_ja.txt (revision 156)
@@ -1,5 +1,5 @@
11 -----------------------------------------------------------------------------
2-Java Service Wrapper Community Edition 3.5.12
2+Java Service Wrapper Community Edition 3.5.13
33 Copyright (C) 1999-2011 Tanuki Software, Ltd. All Rights Reserved.
44 http://wrapper.tanukisoftware.com
55 -----------------------------------------------------------------------------
--- trunk/wrapper/doc/revisions.txt (revision 155)
+++ trunk/wrapper/doc/revisions.txt (revision 156)
@@ -1,6 +1,19 @@
11 Java Service Wrapper Revision History.
22 --------------------------------------
33
4+3.5.13
5+ * Fix a typo in the script where the environment variable 'TR_BIN' should
6+ actually be 'TREXE'. This was causing the "install" command on UNIX
7+ platforms to fail. Introduced in 3.5.12.
8+ * Fix a heap corruption which could lead to a crash that would occur the
9+ second time an internal buffer used for logging was expanded. The buffer
10+ would be expanded the first time a log line over 2048 characters in length
11+ was encountered. Then the second expansion would happen when a line at
12+ least 1024 characters longer was encountered. The only work around for
13+ this issue is to log a single line early which is longer than anything else
14+ the application will log to prevent a second expansion from ever happening.
15+ Introduced in 3.5.11. Bug ID #3423108
16+
417 3.5.12
518 * Put more descriptive Text in case the Wrapper is using integration method 4,
619 but the jar file deos not specify the Main-Class correctly in its meta
--- trunk/wrapper/src/java/org/tanukisoftware/wrapper/test/HugeLogOutput.java (revision 155)
+++ trunk/wrapper/src/java/org/tanukisoftware/wrapper/test/HugeLogOutput.java (revision 156)
@@ -28,22 +28,37 @@
2828 public static void main(String[] args) {
2929 // 62 chars long
3030 String subStr = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890";
31+
32+ // This first test is to check for buffer problems increasing the size of the Wrapper's log buffer.
33+ System.out.println( "Print out 10 long lines of increasing length." );
34+ // Now loop and print this to the console 10 times. Log the time before each line.
35+ StringBuffer sb = new StringBuffer();
36+ SimpleDateFormat df = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss.SSS" );
37+ for ( int i = 0; i < 10; i++ )
38+ {
39+ for ( int j = 0; j < 10; j++ )
40+ {
41+ sb.append( subStr );
42+ }
43+ String longStr = sb.toString();
44+ System.out.println( df.format( new Date() ) );
45+ System.out.println( longStr );
46+ }
3147
48+ // This next test is to check for a speed problem which used to exist with VERY large log lines.
49+ System.out.println( "Print out 10 very long lines of output." );
3250 // Create a string that is 1,000,060 chars long (16130 copies)
33- StringBuffer sb = new StringBuffer();
51+ sb = new StringBuffer();
3452 for ( int i = 0; i < 16130; i++ )
3553 {
3654 sb.append( subStr );
3755 }
38- String longStr = sb.toString();
39-
40- // Now loop and print this to the console 10 times. Log the time before each line
41- System.out.println( "Print out 10 very long lines of output." );
42- SimpleDateFormat df = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss.SSS" );
43- for ( int i = 0; i < 10; i++ )
56+ String hugeStr = sb.toString();
57+ // Now loop and print this to the console 3 times. Log the time before each line.
58+ for ( int i = 0; i < 3; i++ )
4459 {
4560 System.out.println( df.format( new Date() ) );
46- System.out.println( longStr );
61+ System.out.println( hugeStr );
4762 }
4863 System.out.println( "All done." );
4964 }
--- trunk/wrapper/src/c/wrapper.c (revision 155)
+++ trunk/wrapper/src/c/wrapper.c (revision 156)
@@ -3135,6 +3135,8 @@
31353135 int currentBlockRead;
31363136 int defer = FALSE;
31373137 int readThisPass = FALSE;
3138+ size_t removeLen = 0;
3139+ int foundCRLF = FALSE;
31383140
31393141 if (!wrapperChildWorkBuffer) {
31403142 /* Initialize the wrapperChildWorkBuffer. Set its initial size to the block size + 1.
@@ -3175,7 +3177,7 @@
31753177 * but is safer. */
31763178 wrapperChildWorkBufferSize = __max(wrapperChildWorkBufferLen + 1, __max(wrapperChildWorkBufferSize + sizeof(char) * READ_BUFFER_BLOCK_SIZE, wrapperChildWorkBufferSize + wrapperChildWorkBufferSize / 10));
31773179
3178- tempBuffer = malloc(wrapperChildWorkBufferSize);
3180+ tempBuffer = malloc(wrapperChildWorkBufferSize + 1);
31793181 if (!tempBuffer) {
31803182 outOfMemory(TEXT("WRCO"), 2);
31813183 return FALSE;
@@ -3224,8 +3226,10 @@
32243226 #endif
32253227 /* Replace the CR with a NULL */
32263228 (cLF - sizeof(char))[0] = 0;
3229+ foundCRLF = TRUE;
32273230 } else {
32283231 #endif
3232+ foundCRLF = FALSE;
32293233 #ifdef DEBUG_CHILD_OUTPUT
32303234 log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_INFO, TEXT("Found LF"));
32313235 #endif
@@ -3250,11 +3254,18 @@
32503254 #endif
32513255 #endif
32523256 logChildOutput(wrapperChildWorkBuffer);
3257+ /* Remove the line we just logged from the buffer by moving the rest up. */
32533258
3254- /* Remove the line we just logged from the buffer by moving the rest up. */
3259+ removeLen = cLF - wrapperChildWorkBuffer + 1;
3260+#ifdef DEBUG_CHILD_OUTPUT
3261+ log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_INFO, TEXT("removeLen: %d"), removeLen);
3262+#endif
3263+
32553264 /* NOTE - This line intentionally does the copy within the same memory space. It is safe the way it is working however. */
3256- wrapperChildWorkBufferLen -= (cLF - wrapperChildWorkBuffer) + 1;
3257- safeMemCpy(wrapperChildWorkBuffer, 0, cLF - wrapperChildWorkBuffer + 1, wrapperChildWorkBufferLen + 1);
3265+ wrapperChildWorkBufferLen = wrapperChildWorkBufferLen - removeLen;
3266+ safeMemCpy(wrapperChildWorkBuffer, 0, removeLen, wrapperChildWorkBufferLen);
3267+ /* just to make sure the buffer has been ended properly */
3268+ wrapperChildWorkBuffer[wrapperChildWorkBufferLen] = 0;
32583269 } else {
32593270 /* If we read this pass or if the last character is a CR on Windows then we always want to defer. */
32603271 if (readThisPass
--- trunk/wrapper/src/c/wrapperinfo.c.in (revision 155)
+++ trunk/wrapper/src/c/wrapperinfo.c.in (revision 156)
@@ -28,7 +28,7 @@
2828 TCHAR *wrapperBits = TEXT("@bits@");
2929 TCHAR *wrapperArch = TEXT("@dist.arch@");
3030 TCHAR *wrapperOS = TEXT("@dist.os@");
31-TCHAR *wrapperReleaseDate = TEXT("20110929");
31+TCHAR *wrapperReleaseDate = TEXT("20111102");
3232 TCHAR *wrapperReleaseTime = TEXT("0000");
3333 TCHAR *wrapperBuildDate = TEXT("@build.date@");
3434 TCHAR *wrapperBuildTime = TEXT("@build.time@");
--- trunk/wrapper/src/bin/QueryApp-NT.bat.in (revision 155)
+++ trunk/wrapper/src/bin/QueryApp-NT.bat.in (revision 156)
@@ -14,7 +14,7 @@
1414
1515 rem -----------------------------------------------------------------------------
1616 rem These settings can be modified to fit the needs of your application
17-rem Optimized for use with version 3.5.12 of the Wrapper.
17+rem Optimized for use with version 3.5.13 of the Wrapper.
1818
1919 rem The base name for the Wrapper binary.
2020 set _WRAPPER_BASE=wrapper
--- trunk/wrapper/src/bin/StopApp-NT.bat.in (revision 155)
+++ trunk/wrapper/src/bin/StopApp-NT.bat.in (revision 156)
@@ -14,7 +14,7 @@
1414
1515 rem -----------------------------------------------------------------------------
1616 rem These settings can be modified to fit the needs of your application
17-rem Optimized for use with version 3.5.12 of the Wrapper.
17+rem Optimized for use with version 3.5.13 of the Wrapper.
1818
1919 rem The base name for the Wrapper binary.
2020 set _WRAPPER_BASE=wrapper
--- trunk/wrapper/src/bin/InstallApp-NT.bat.in (revision 155)
+++ trunk/wrapper/src/bin/InstallApp-NT.bat.in (revision 156)
@@ -14,7 +14,7 @@
1414
1515 rem -----------------------------------------------------------------------------
1616 rem These settings can be modified to fit the needs of your application
17-rem Optimized for use with version 3.5.12 of the Wrapper.
17+rem Optimized for use with version 3.5.13 of the Wrapper.
1818
1919 rem The base name for the Wrapper binary.
2020 set _WRAPPER_BASE=wrapper
--- trunk/wrapper/src/bin/sh.script.in (revision 155)
+++ trunk/wrapper/src/bin/sh.script.in (revision 156)
@@ -16,7 +16,7 @@
1616
1717 #-----------------------------------------------------------------------------
1818 # These settings can be modified to fit the needs of your application
19-# Optimized for use with version 3.5.12 of the Wrapper.
19+# Optimized for use with version 3.5.13 of the Wrapper.
2020
2121 # Application
2222 APP_NAME="@app.name@"
@@ -1028,7 +1028,7 @@
10281028 eval echo `gettext 'Must be root to perform this action.'`
10291029 exit 1
10301030 else
1031- APP_NAME_LOWER=`echo "$APP_NAME" | $TR_BIN "[A-Z]" "[a-z]"`
1031+ APP_NAME_LOWER=`echo "$APP_NAME" | $TREXE "[A-Z]" "[a-z]"`
10321032 if [ "$DIST_OS" = "solaris" ] ; then
10331033 eval echo `gettext 'Detected Solaris:'`
10341034 if [ -f /etc/init.d/$APP_NAME ] ; then
--- trunk/wrapper/src/bin/UninstallApp-NT.bat.in (revision 155)
+++ trunk/wrapper/src/bin/UninstallApp-NT.bat.in (revision 156)
@@ -14,7 +14,7 @@
1414
1515 rem -----------------------------------------------------------------------------
1616 rem These settings can be modified to fit the needs of your application
17-rem Optimized for use with version 3.5.12 of the Wrapper.
17+rem Optimized for use with version 3.5.13 of the Wrapper.
1818
1919 rem The base name for the Wrapper binary.
2020 set _WRAPPER_BASE=wrapper
--- trunk/wrapper/src/bin/AppTemplate.bat.in (revision 155)
+++ trunk/wrapper/src/bin/AppTemplate.bat.in (revision 156)
@@ -14,7 +14,7 @@
1414
1515 rem -----------------------------------------------------------------------------
1616 rem These settings can be modified to fit the needs of your application
17-rem Optimized for use with version 3.5.12 of the Wrapper.
17+rem Optimized for use with version 3.5.13 of the Wrapper.
1818
1919 rem The base name for the Wrapper binary.
2020 set _WRAPPER_BASE=wrapper
--- trunk/wrapper/src/bin/PauseApp-NT.bat.in (revision 155)
+++ trunk/wrapper/src/bin/PauseApp-NT.bat.in (revision 156)
@@ -14,7 +14,7 @@
1414
1515 rem -----------------------------------------------------------------------------
1616 rem These settings can be modified to fit the needs of your application
17-rem Optimized for use with version 3.5.12 of the Wrapper.
17+rem Optimized for use with version 3.5.13 of the Wrapper.
1818
1919 rem The base name for the Wrapper binary.
2020 set _WRAPPER_BASE=wrapper
--- trunk/wrapper/src/bin/StartApp-NT.bat.in (revision 155)
+++ trunk/wrapper/src/bin/StartApp-NT.bat.in (revision 156)
@@ -14,7 +14,7 @@
1414
1515 rem -----------------------------------------------------------------------------
1616 rem These settings can be modified to fit the needs of your application
17-rem Optimized for use with version 3.5.12 of the Wrapper.
17+rem Optimized for use with version 3.5.13 of the Wrapper.
1818
1919 rem The base name for the Wrapper binary.
2020 set _WRAPPER_BASE=wrapper
--- trunk/wrapper/src/bin/AppCommand.bat.in (revision 155)
+++ trunk/wrapper/src/bin/AppCommand.bat.in (revision 156)
@@ -14,7 +14,7 @@
1414
1515 rem -----------------------------------------------------------------------------
1616 rem These settings can be modified to fit the needs of your application
17-rem Optimized for use with version 3.5.12 of the Wrapper.
17+rem Optimized for use with version 3.5.13 of the Wrapper.
1818
1919 rem The base name for the Wrapper binary.
2020 set _WRAPPER_BASE=wrapper
--- trunk/wrapper/src/bin/App.bat.in (revision 155)
+++ trunk/wrapper/src/bin/App.bat.in (revision 156)
@@ -14,7 +14,7 @@
1414
1515 rem -----------------------------------------------------------------------------
1616 rem These settings can be modified to fit the needs of your application
17-rem Optimized for use with version 3.5.12 of the Wrapper.
17+rem Optimized for use with version 3.5.13 of the Wrapper.
1818
1919 rem The base name for the Wrapper binary.
2020 set _WRAPPER_BASE=wrapper
--- trunk/wrapper/src/bin/ResumeApp-NT.bat.in (revision 155)
+++ trunk/wrapper/src/bin/ResumeApp-NT.bat.in (revision 156)
@@ -14,7 +14,7 @@
1414
1515 rem -----------------------------------------------------------------------------
1616 rem These settings can be modified to fit the needs of your application
17-rem Optimized for use with version 3.5.12 of the Wrapper.
17+rem Optimized for use with version 3.5.13 of the Wrapper.
1818
1919 rem The base name for the Wrapper binary.
2020 set _WRAPPER_BASE=wrapper
--- trunk/wrapper/src/bin/AppTemplatePassThrough.bat.in (revision 155)
+++ trunk/wrapper/src/bin/AppTemplatePassThrough.bat.in (revision 156)
@@ -14,7 +14,7 @@
1414
1515 rem -----------------------------------------------------------------------------
1616 rem These settings can be modified to fit the needs of your application
17-rem Optimized for use with version 3.5.12 of the Wrapper.
17+rem Optimized for use with version 3.5.13 of the Wrapper.
1818
1919 rem The base name for the Wrapper binary.
2020 set _WRAPPER_BASE=wrapper
--- trunk/wrapper/README_en.txt (revision 155)
+++ trunk/wrapper/README_en.txt (revision 156)
@@ -1,5 +1,5 @@
11 -----------------------------------------------------------------------------
2-Java Service Wrapper Community Edition 3.5.12
2+Java Service Wrapper Community Edition 3.5.13
33 Copyright (C) 1999-2011 Tanuki Software, Ltd. All Rights Reserved.
44 http://wrapper.tanukisoftware.com
55 -----------------------------------------------------------------------------
旧リポジトリブラウザで表示