[omniORB] IDL compiler core dump
Douglas Kosovic
douglask@dstc.edu.au
Mon, 11 Oct 1999 18:15:53 +1000
This is a multi-part message in MIME format.
--------------D08947B06AA0260BD2D13545
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hi,
Given an IDL file which contains a typedef of an interface being used as
a member of an exception. For example:
interface RefObject {};
typedef RefObject DesignatorType;
exception myError {
DesignatorType designator;
};
The omniORB 2.8.0 idl compiler will core dump.
I think the attached patch will fix the bug.
Doug.
--------------D08947B06AA0260BD2D13545
Content-Type: text/plain; charset=us-ascii;
name="o2be_exception.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="o2be_exception.patch"
*** src/tool/omniidl2/omniORB2_be/o2be_exception.cc Mon Oct 11 16:57:47 1999
--- newsrc/tool/omniidl2/omniORB2_be/o2be_exception.cc Mon Oct 11 17:55:09 1999
***************
*** 554,563 ****
case o2be_operation::tObjref:
{
! o2be_interface* intf =
! o2be_interface::narrow_from_decl(dd->field_type());
! IND(s); s << intf->fqname() << "_Helper::duplicate(_"
! << dd->uqname() << ");\n";
IND(s); s << dd->uqname() << " = _" << dd->uqname() << ";\n";
}
break;
--- 554,574 ----
case o2be_operation::tObjref:
{
! if (dd->field_type()->node_type() == AST_Decl::NT_interface)
! {
! o2be_interface* intf =
! o2be_interface::narrow_from_decl(dd->field_type());
! IND(s); s << intf->fqname() << "_Helper::duplicate(_"
! << dd->uqname() << ");\n";
! }
! else
! {
! o2be_typedef* tdef =
! o2be_typedef::narrow_from_decl(dd->field_type());
! IND(s); s << tdef->fqname() << "_Helper::duplicate(_"
! << dd->uqname() << ");\n";
! }
!
IND(s); s << dd->uqname() << " = _" << dd->uqname() << ";\n";
}
break;
--------------D08947B06AA0260BD2D13545--