[omniORB] Bug in OmniORB 2.5.0 on AIX

Gary D. Duzan gdd0@gte.com
Fri, 08 May 1998 19:34:04 -0400


   I have recently discovered that the shared libraries on AIX when
using xlC (C Set ++) are not built correctly. Everything will appear to
compile, link, and your programs run fine, until the system is put
under load with multiple active threads. The problem is that the
libraries are built to link to the un-thread safe C++ libraries instead
of the thread safe ones, so even if you link your program to use the
thread safe version, the OmniORB and OmniThread libraries will still
get their code from the standard one. The symptom is that the program
core dumps in different parts of the malloc subsystem at random times.
   The following patch to OmniORB 2.5.0 fixes the problem, and so far I
have not seen the symptom reappear.  The problem also existed in
earlier versions, so if you are still using them they will require
fixes as well. The fix is quite similar, except that is is applied to
the powerpc_aix_4.2.mk files in OmniORB 2.2.0.

					Gary Duzan
					GTE Laboratories





*** omnithread/sharedlib/dir.mk.orig	Fri May  8 18:12:43 1998
--- omnithread/sharedlib/dir.mk	Fri May  8 18:13:21 1998
***************
*** 202,211 ****
  $(lib): $(OBJS)
  	(set -x; \
          $(RM) $@; \
!         /usr/lpp/xlC/bin/makeC++SharedLib \
               -o $(soname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) \
!          -lC -lpthreads -lc_r -lc -p 40; \
           ar cq $(lib) $(soname) ; \
           $(RM) $(soname) ; \
         )
--- 202,211 ----
  $(lib): $(OBJS)
  	(set -x; \
          $(RM) $@; \
!         /usr/lpp/xlC/bin/makeC++SharedLib_r \
               -o $(soname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) \
!          -p 40; \
           ar cq $(lib) $(soname) ; \
           $(RM) $(soname) ; \
         )
*** omniORB2/sharedlib/dir.mk.orig	Fri May  8 17:59:22 1998
--- omniORB2/sharedlib/dir.mk	Fri May  8 18:00:21 1998
***************
*** 332,341 ****
  $(lib): $(ORB2_OBJS)
  	(set -x; \
          $(RM) $@; \
!         /usr/lpp/xlC/bin/makeC++SharedLib \
               -o $(soname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
!          -lC -lc_r -lc -p 40; \
           ar cq $(lib) $(soname); \
           $(RM) $(soname); \
         )
--- 332,341 ----
  $(lib): $(ORB2_OBJS)
  	(set -x; \
          $(RM) $@; \
!         /usr/lpp/xlC/bin/makeC++SharedLib_r \
               -o $(soname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) \
!          -p 40; \
           ar cq $(lib) $(soname); \
           $(RM) $(soname); \
         )
***************
*** 343,352 ****
  $(lclib): $(LC_OBJS)
  	(set -x; \
          $(RM) $@; \
!         /usr/lpp/xlC/bin/makeC++SharedLib \
               -o $(lcsoname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) $(lib) \
!          -lC -lc_r -lc -p 40; \
           ar cq $(lclib) $(lcsoname); \
           $(RM) $(lcsoname); \
         )
--- 343,352 ----
  $(lclib): $(LC_OBJS)
  	(set -x; \
          $(RM) $@; \
!         /usr/lpp/xlC/bin/makeC++SharedLib_r \
               -o $(lcsoname) $(IMPORT_LIBRARY_FLAGS) \
           $(filter-out $(LibSuffixPattern),$^) $(OMNITHREAD_LIB) $(lib) \
!          -p 40; \
           ar cq $(lclib) $(lcsoname); \
           $(RM) $(lcsoname); \
         )