[omniORB] segfault - bug or not?

Johan Cronje jcronje at dsp.sun.ac.za
Fri Oct 24 18:43:36 BST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Good day

I am in the process of writing a corba application, and have encountered an 
interesting situation while testing my application. In my idl file I have the 
following:

   typedef string param_str;
   typedef sequence<param_str> param_seq;

Now in my test implementation I have the following to test my application.

   param_seq my_p;
   my_p.length(1);
   param_str one1;
   one1 = "some string";
   my_p[0] = one1;

This generates SIGSEGV as soon as the program finishes and ~param_seq() is
called (it calls some other string sequence destructors and generates the 
signal in /lib/libc.so.6 (_int_free to be precise)).

If I change it to

   param_seq my_p;
   my_p.length(1);
   my_p[0] = "some string";

everything is OK. Is this normal? If so, why doesn't my first attempt work?

Note that I am not running it as a CORBA app yet, I am still implementing my 
interface methods and wrote a small test application that only uses the 
methods declared in my IDL file. Surely it should work OK?

Thank you and Best Regards
Johan

- -- 
"There is beauty in simplicity"		-- Johan Cronje
- ---------------------------------------------------------------
Johan Cronje
Digital Signal Processing / Telecommunications Group
Electrical and Electronic Engineering Department
University of Stellenbosch
http://www.dsp.sun.ac.za/~jcronje
- ---------------------------------------------------------------
GNUPG Key: http://www.dsp.sun.ac.za/~jcronje/jcronje.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iQEVAwUBP5lIreEeclgONaRbAQJ3jgf/SCkWjde6x4nAHAzyhz9kx0geCrDMCsIq
WPo8JjWWQXKv+NUNyAEcHJ2oIfYWiQPEpkO8vJUby7KbIAzd7ZcJS1mjFaPbl0zJ
sxzZy7YREnAYJMBuclbACci/U80FH/+c8wn/IsN8H5PKhFgd1EZ+i1dIl3hiRMGu
3SiyHXPzyBu0/bcQ1TalZYXutBtI/Th4FKmUxyCKgsBbNNxhaNgIsm0iIIQuhjAA
oljOTX3KR3xCiDtYXJZBhis+uWJD9j2HBiUdHSbM5kJEE5tEyBuv/sW/UBxS+dts
KFeNkIi78OWicM5IOjCR5FvmA3S0NbXP/5N+LZvYdOFLuB58imvppw==
=CCGw
-----END PGP SIGNATURE-----




More information about the omniORB-list mailing list