[Bug 999] New: Unexpected string terminator on marshaling huge strings with JacORB 3.5

[email protected] Wed, 07 Jan 2015 04:43:17 +0000
Newsgroups gmane.comp.corba.jacorb.bugs
Message-ID <[email protected]/bugzilla/>
http://www.jacorb.org/bugzilla/show_bug.cgi?id=999

            Bug ID: 999
           Summary: Unexpected string terminator on marshaling huge
                    strings with JacORB 3.5
           Product: JacORB
           Version: 3.5
          Hardware: PC
                OS: All
            Status: NEW
          Severity: major
          Priority: P5
         Component: ORB
          Assignee: [email protected]
          Reporter: [email protected]

Created attachment 451
  --> http://www.jacorb.org/bugzilla/attachment.cgi?id=451&action=edit
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

-- 
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
jacorb-bugs mailing list
[email protected]
https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-bugs