[OpenSTA-devel] [ opensta-Bugs-1083975 ] Concatenating large SCL strings can cause compiler to cras
Brought to you by:
dansut
|
From: SourceForge.net <no...@so...> - 2006-08-23 08:08:05
|
Bugs item #1083975, was opened at 2004-12-12 19:44 Message generated for change (Comment added) made by collas You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110857&aid=1083975&group_id=10857 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Script Language Group: Crash Status: Open Resolution: Works For Me Priority: 5 Submitted By: Daniel Sutcliffe (dansut) Assigned to: Daniel Sutcliffe (dansut) Summary: Concatenating large SCL strings can cause compiler to crash Initial Comment: Concatenating VERY large SCL strings can cause the compiler to crash and leave invalid (incomplete) compiled TOF files in place. This is usually done to work around the SCL limits on max variable size - specifically when dealing with multipart/form-data file uploads. In fact, recent changes mean the SCL generated by a recording may show this problem. An example of the problem code is ... ,BODY "A very very long sequence of chars" & ... "probably more than 50K worth" + & "Another huge string of similar size to" & ... "cause the issue" There does seem to be a workaround. Place your BODY contents in character variables and then concatenate thus: ... SET BODYCONT1="A very very long sequence of chars" & ... "probably more than 50K worth" SET BODYCONT2="Another huge string of similar size to" & ... "cause the issue" ... ,BODY BODYCONT1 + BODYCONT2 More investigation required to find actual boundaries and cause of this problem. ---------------------------------------------------------------------- Comment By: randal (collas) Date: 2006-08-23 08:08 Message: Logged In: YES user_id=1581981 It would be extremely useful to have a binary release of opensta that had a larger than 64K limit for variables, like the version that tboullet created. Does anyone know if it is available anywhere? Or if some dlls could be replaced in 1.4.3 to achieve this goal. ---------------------------------------------------------------------- Comment By: Thierry Boullet (tboullet) Date: 2005-06-06 17:13 Message: Logged In: YES user_id=949869 I reproduced this bug during the use of OpenSTA 1.4.2 with large viewstate. I made additional tests, here the description and the results: OS : Windows XP Pro SP2 with last updates SCRIPT_65850_142 : script captured with 1.4.2 containing a literal string with 65850 chars (body of a POST request, 1 block) SCRIPT_65850_143 : script captured with 1.4.3 containing a literal string with 65850 chars (3 blocks with 2 concatenations) SCRIPT_96970_142 : script captured with 1.4.2 containing a literal string with 96970 chars (body of a POST request, 1 block) SCRIPT_96970_143 : script captured with 1.4.3 containing a literal string with 96970 chars (3 blocks with 2 concatenations) SCRIPT_65850_142 and SCRIPT_96970_142 compiled in Script Modeler 1.4.2 or 1.4.3 => error maxstrlen (that's normal) SCRIPT_65850_143 compiled in Script Modeler 1.4.2 or 1.4.3 => success (that's "normal" and has been the previous workaround for the large BODY problems of the past) SCRIPT_96970_143 compiled in Script Modeler 1.4.2 or 1.4.3 => crash of scl.exe (see attached file) I built another version of OpenSTA which is based on the 1.4.3 with the following modifications: - file \src\Architecture\Scl\scl_limits.h: #define MAX_VARIABLE_SIZE 262143 (Maximum size of a variable or record) #define MAX_LITERAL_SIZE 262143 (Maximum size of a character literal or constant) - file \src\Architecture\Scl\scl_tpacom.h : #define MAX_CONSTANT_SIZE 262143 (Max size of constants area) #define CHRBUFSIZ 262144 (Character string storage) The new limits of 256K that I used are arbitrary. Role of MAX_VARIABLE_SIZE : for example : CHARACTER*70000 STR_TMP => error (modoutrange), Character Modifier Out of Range. Valid Range 1 to 65535 Role of MAX_LITERAL_SIZE : for example : "A very very long sequence of chars more than 64K" => error (maxstrlen), Maximum String Length Limit Exceeded Role of MAX_CONSTANT_SIZE : It's the limit of space available for all the constant values defined in the script and in the included files. for example : definition of many large constants (> 64K) => error (consoverflow), Constants Data Area Overflow Role of CHRBUFSIZ : for example : if a string is > CHRBUFSIZ, crash of scl.exe The constant MAX_STRING_LEN in the file \src\Architecture\Scl\scl_comdef.h is not used. With this version, results are : SCRIPT_65850_142 and SCRIPT_96970_142 compiled in Script Modeler => success SCRIPT_65850_143 compiled in Script Modeler => success SCRIPT_96970_143 compiled in Script Modeler => success The use of variables > 64k functions correctly (DOM Addressing, encoding, use in the body of a POST). I think that it is a track to exceed the limit of the 64K when that is really necessary. ---------------------------------------------------------------------- Comment By: Daniel Sutcliffe (dansut) Date: 2005-05-10 19:46 Message: Logged In: YES user_id=19748 Quite a few fixes in this area and I now can't reproduce - leaving the bug open though just to let people know it is possible. If you see this issue on an OpenSTA installation newer than 1.4.2 then please comment on this bug report. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110857&aid=1083975&group_id=10857 |