<html>
    <head>
      <base href="http://www.jacorb.org/bugzilla/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Unexpected string terminator on marshaling huge strings with JacORB 3.5"
   href="http://www.jacorb.org/bugzilla/show_bug.cgi?id=999">999</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Unexpected string terminator on marshaling huge strings with JacORB 3.5
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>JacORB
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.5
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>major
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P5
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>ORB
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>jacorb-bugs@lists.spline.inf.fu-berlin.de
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>amadeu@tecgraf.puc-rio.br
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=451" name="attach_451" title="client-server example that reproduces the bug on marshaling huge strings">attachment 451</a> <a href="attachment.cgi?id=451&action=edit" title="client-server example that reproduces the bug on marshaling huge strings">[details]</a></span>
client-server example that reproduces the bug on marshaling huge strings

I've experiencing a MARSHAL exception when I use a huge string as parameter (or
even as return value). In my test, I used a 10000 length string containing the
char '1'.

Exception on server-side:
org.omg.CORBA.MARSHAL: unexpected string terminator value 31 at buffer index
108
    at org.jacorb.orb.CDRInputStream.read_string(CDRInputStream.java:1253)
    at test.bigsize.TestPOA._invoke(TestPOA.java:46)
    at
org.jacorb.poa.RequestProcessor.invokeOperation(RequestProcessor.java:350)
    at org.jacorb.poa.RequestProcessor.process(RequestProcessor.java:672)
    at org.jacorb.poa.RequestProcessor.run(RequestProcessor.java:830)

IDL:
module test
{
    module bigsize {
        interface Test {
            void input(in string s1);
        };
    };
};

Part of message request (I used jacorb.debug.dump_outgoing_messages=on):
47 49 4F 50  01 02 00 00  00 00 27 71  00 00 00 00  GIOP .... ..'q .... 
03 00 00 00  00 00 00 00  00 00 00 22  34 32 32 30  .... .... ..." 4220 
31 35 34 31  37 33 2F 00  01 10 43 00  03 04 10 01  1541 73/. ..C. .... 
42 04 46 10  06 30 46 38  14 14 1B 48  4C 1B 00 00  B.F. .0F8 ...H L... 
00 00 00 06  69 6E 70 75  74 00 00 00  00 00 00 01  .... inpu t... .... 
00 00 00 01  00 00 00 0C  00 00 00 00  05 01 00 01  .... .... .... .... 
00 01 01 09  00 00 00 22  00 00 00 01  31 31 31 31  .... ..." .... 1111
31 31 31 31  31 31 31 31  31 31 31 31  31 31 31 31  1111 1111 1111 1111

I can see the error on "00 00 00 01", it should be the size of string and not
0x1.

When I tried JacORB 3.4 (and lower versions) it works fine and I got "00 00 27
11" as expected instead of "00 00 00 01".

In order to execute my test (attached):
mvn compile
mvn dependency:copy-dependencies
./runserver
./runclient

Thank you in advance,
Amadeu A. Barbosa Jr</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>