possible bugs in ORBit2 and fix



Hello,

During the migration from ORBit-0.5.  to ORBit2.2.3.104,  have to have
the following patch to work properly.  There are two items in the patch.

1. possible bugs in orbit-small.c

It seems that in several locations a->flags instead of m->flags should
be
used to make sure memroy is properly allocated.

2. hope the following two functions can be put into corba-any.h, i.e.,

void ORBit_copy_value_core (.....) and
CORBA_short ORBit_TC_find_c_alignment (CORBA_TypeCode tc)

Regards,
Ling
diff -Naur ORBit2-2.3.103/include/orbit/orb-core/corba-any.h ORBit2-2.3.103.fix/include/orbit/orb-core/corba-any.h
--- ORBit2-2.3.103/include/orbit/orb-core/corba-any.h	Tue Oct 30 09:16:42 2001
+++ ORBit2-2.3.103.fix/include/orbit/orb-core/corba-any.h	Fri Feb  1 11:54:12 2002
@@ -23,6 +23,11 @@
 
 #ifdef ORBIT2_INTERNAL_API
 
+void
+ORBit_copy_value_core (gconstpointer *val,
+               gpointer      *newval,
+               CORBA_TypeCode tc);
+
 void     ORBit_marshal_arg      (GIOPSendBuffer *buf,
 				 gconstpointer   val,
 				 CORBA_TypeCode  tc);
@@ -63,6 +68,8 @@
 				 CORBA_TypeCode  tc);
 
 size_t ORBit_gather_alloc_info  (CORBA_TypeCode tc);
+
+CORBA_short ORBit_TC_find_c_alignment(CORBA_TypeCode tc);
 
 #endif /* ORBIT2_INTERNAL_API */
 
diff -Naur ORBit2-2.3.103/src/orb/orb-core/corba-typecode.c ORBit2-2.3.103.fix/src/orb/orb-core/corba-typecode.c
--- ORBit2-2.3.103/src/orb/orb-core/corba-typecode.c	Fri Jan 25 02:33:25 2002
+++ ORBit2-2.3.103.fix/src/orb/orb-core/corba-typecode.c	Fri Feb  1 11:53:07 2002
@@ -328,7 +328,7 @@
   return FALSE;
 }
 
-static CORBA_short
+CORBA_short
 ORBit_TC_find_c_alignment (CORBA_TypeCode tc)
 {
 	CORBA_short retval = 1;
diff -Naur ORBit2-2.3.103/src/orb/orb-core/orbit-small.c ORBit2-2.3.103.fix/src/orb/orb-core/orbit-small.c
--- ORBit2-2.3.103/src/orb/orb-core/orbit-small.c	Tue Jan 22 06:50:56 2002
+++ ORBit2-2.3.103.fix/src/orb/orb-core/orbit-small.c	Fri Feb  1 13:20:46 2002
@@ -716,7 +716,7 @@
 				break;
 			case STRUCT_UNION_TYPES:
 			case CORBA_tk_array:
-				if (m_data->flags & ORBit_I_COMMON_FIXED_SIZE) {
+				if (a->flags & ORBit_I_COMMON_FIXED_SIZE) {
 					p = args [i] = alloca (ORBit_gather_alloc_info (tc));
 					do_demarshal_value (recv_buffer, &p, tc, orb);
 					p = args [i];
@@ -746,7 +746,7 @@
 				break;
 			case STRUCT_UNION_TYPES:
 			case CORBA_tk_array:
-				if (m_data->flags & ORBit_I_COMMON_FIXED_SIZE) {
+				if (a->flags & ORBit_I_COMMON_FIXED_SIZE) {
 					scratch [i] = ORBit_alloc_by_tc (tc);
 					break;
 				} /* drop through */
@@ -932,7 +932,7 @@
 				break;
 			case STRUCT_UNION_TYPES:
 			case CORBA_tk_array:
-				if (m_data->flags & ORBit_I_COMMON_FIXED_SIZE) {
+				if (a->flags & ORBit_I_COMMON_FIXED_SIZE) {
 					ORBit_freekids_via_TypeCode (tc, args [i]);
 					break;
 				}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]