Bug Report no. 45

attlogo6876_dk.gif (2280 bytes)

sideHome.gif (2321 bytes) sideDownload.gif (2450 bytes) sideDocumentation.gif (2512 bytes) sideFAQ.gif (2344 bytes) sidePatch.gif (2543 bytes) sideSearch.gif (2403 bytes)

Reported By

Teemu Torma

Date

28 Jan 1999

Platforms

All

Version

omniORB 2.7.0

Description

The code for marshalling values of type Any onto and off the wire (and also for copying values of type Any) does its best to copy the data in blocks where possible. The code for performing this analysis has a bug, which causes certain types of IDL structures and exceptions to be marshalled incorrectly under certain circumstances. This can cause a CORBA::MARSHAL exception to be thrown, or even a crash.

The problem occurs when a number of fixed size elements of small size are followed by a fixed size element of larger size, and the total size of the small fixed size elements is a multiple of the alignment requirement of the larger element. For example:

       // IDL
       struct S {
         short a;
         short b;
         long c;
       };

This structure is marshalled incorrectly if started on a boundary which is not aligned to 4 bytes.

Patch

Apply this patch.

The patch changes src/lib/omniORB2/dynamic/typecode.cc

 

For comments, feedback, etc, please see the 'Keeping in touch' page.
Copyright 1999 - AT&T Laboratories Cambridge