Hello,
I noticed that iop.cc has a few asserts that cause the side effect of
activerefs refcounting to behave differently between release and debug
versions, since mico defines assert as
#define assert(exp)
when NDEBUG is defined.
I have no guarantees that the refcounting is correct after this, it
would almost have to be wrong in either debug or release version since
their behaviour differed.
Attached is a patch that changes the asserts to first store the value in
a var and then assert that. The patch is -p1 in mico directory (against
2.3.12, issue is there in latest too). It seems somebody has been trying
to debug the refcounting mechanisms at some point, so maybe this will
help some.
I also noted that this issue was reported on the mailing list in 2004,
but not included in the codebase for some reason. Original report here:
http://www.mico.org/pipermail/mico-devel/2004-June/008765.html
regards,
Arne Pajunen
--
Arne Pajunen
Software Engineer
OpenTTCN Oy, Test and Test Control Components for Test System Vendors
Web: http://www.openttcn.com
Email: [EMAIL PROTECTED]
--- mico-2.3.12\orb\iop.cc Fri Nov 25 12:16:22 2005
+++ mico-new\orb\iop.cc Wed Aug 16 10:41:31 2006
@@ -3837,7 +3837,8 @@
return FALSE;
}
#ifdef HAVE_THREADS
- assert(conn->active_ref());
+ CORBA::Boolean ref = conn->active_ref();
+ assert(ref);
#endif
if (!conn->codec()->converter()) {
#ifdef HAVE_THREADS
@@ -3936,7 +3937,8 @@
return TRUE;
}
#ifdef HAVE_THREADS
- assert(conn->active_ref());
+ CORBA::Boolean ref = conn->active_ref();
+ assert(ref);
#endif
if (MICO::Logger::IsLogged (MICO::Logger::GIOP)) {
MICOMT::AutoDebugLock __lock;
_______________________________________________
Mico-devel mailing list
[email protected]
http://www.mico.org/mailman/listinfo/mico-devel