Hi!
I experienced another two bugs that have to do with
sequences:
- In a function of an interface I copy a sequence and
return it to the client. If the sequence has zero
length the client's call to the c-stub-function returns
0x0 and a some Systemexception. The program then
segfaults in the exception handler. E.g.:
module test {
struct bar {
long id;
string descr;
}
typedef sequence<bar> foo;
interface hello {
foo say_hello();
};
}
and:
test::hello::hello() {
}
test::foo* test::hello::say_hello() {
test::foo foo1;
foo1.length(0); // Only if the length is zero, the error occurs
test::foo* foo2 = new foo;
*foo2 = foo1;
return foo2; // foo2 is returned but the client receives 0x0
// and a Systemexception; the stub-function never
// returns, though; the program segfaults !
}
- I find it impossible to copy a struct that holds
a sequence<double> - this time an exception is thrown
in libstdc++. The struct looks as follows:
module test {
struct bar1_t {
short s1;
short s2;
short s3;
};
typedef sequence<double> bar2_t;
struct foo {
bar1_t bar1;
bar2_t bar2;
};
}
The code that faults is:
void doTest() {
test::foo foo1;
foo1.bar2.length(1);
test::foo foo2( foo1 ); // exception thrown in some
corba-copy-function
}
I will do some debugging if nobody knows a solution
to these. Have to get a newer version of gcc and gdb
first; gcc 2.95.2 with gdb 4.18-4 is a horror if you
work with shared libraries :-(
Cu,
Martin
|