Hi, I am receiving a segfault when trying to generate code for a valuetype. I think it has something to do with the valuetype supporting an interface that is an alias.
I have isolated the problem using the two idl files attached. You can reproduce it running "idl -I. myidl2.idl". I also attached a patch that tries to solve the problem, but I am not sure about it's correctness. Can you please take a look? The gdb backtrace shows this: Program received signal SIGSEGV, Segmentation fault. IDLParser::collectValueDcl (this=0x7fffffffceb0, con=0x73b810, node=0x728740) at idlparser.cc:2247 2247 if (sif->def_kind() == CORBA::dk_Interface) { (gdb) bt #0 IDLParser::collectValueDcl (this=0x7fffffffceb0, con=0x73b810, node=0x728740) at idlparser.cc:2247 #1 0x0000000000438b6b in IDLParser::scan (this=0x7fffffffceb0, con=0x73b810, node=<optimized out>) at idlparser.cc:272 #2 0x0000000000439e03 in IDLParser::collectModule (this=0x7fffffffceb0, con=0x737030, node=0x7288c0) at idlparser.cc:807 #3 0x0000000000438b6b in IDLParser::scan (this=0x7fffffffceb0, con=0x737030, node=<optimized out>) at idlparser.cc:272 #4 0x0000000000439e03 in IDLParser::collectModule (this=0x7fffffffceb0, con=0x7327a0, node=0x728a00) at idlparser.cc:807 #5 0x0000000000438b6b in IDLParser::scan (this=0x7fffffffceb0, con=0x7327a0, node=<optimized out>) at idlparser.cc:272 #6 0x000000000043a0ea in IDLParser::collect (this=0x7fffffffceb0, cont=0x7327a0, root=0x728cc0) at idlparser.cc:89 #7 0x000000000041c5bd in main (argc=3, argv=<optimized out>) at main.cc:189 Thanks, Victor Fusco "The future is here. It's just not widely distributed yet." William Gibson
module scope1 { module scope2 { abstract interface MyAbstractInterface { string getName(); }; }; };
#include <myidl.idl> module scope1 { module scope3 { typedef scope1::scope2::MyAbstractInterface MyAbstractInterface; valuetype MyValueType supports MyAbstractInterface { public boolean value; }; }; };
Index: idlparser.cc =================================================================== --- idlparser.cc (revision 118683) +++ idlparser.cc (working copy) @@ -2241,8 +2241,13 @@ while (sins != NULL) { assert (sins->getType() == scoped_names); ParseNode * sin = sins->getBranch (1); - CORBA::IDLType_var t = collectType (con, sin); - CORBA::InterfaceDef_ptr sif = CORBA::InterfaceDef::_narrow (t); + CORBA::IDLType_var resolv_type = collectType (con, sin); + while( resolv_type->def_kind() == CORBA::dk_Alias ) { + CORBA::AliasDef_var a = CORBA::AliasDef::_narrow( resolv_type ); + assert( !CORBA::is_nil( a ) ); + resolv_type = a->original_type_def(); + } + CORBA::InterfaceDef_ptr sif = CORBA::InterfaceDef::_narrow (resolv_type); if (sif->def_kind() == CORBA::dk_Interface) { if (have_concrete_if) {
------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2
_______________________________________________ Mico-devel mailing list Mico-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mico-devel