[omniORB] Omni 4.0.6 and Purify
Duncan Grisby
duncan at grisby.org
Wed Jan 4 11:22:04 GMT 2006
On Wednesday 4 January, Regis DETRE wrote:
> We had some troubles to run one of our applications linked with Rational
> Purify (4.2 and 2002) on Solaris 2.5.1 platforms.
>
> After investigations, we have localized the trouble. It happens when
> invoking the libomnithread.so library. The constructor of the static
> member omni_thread_init (in src/lib/omnithread/solaris.cc) calls the
> function thr_self() but the thread is not yet created, so segmentation
> fault occurs.
Are you using the solaris.cc version of omnithread for a good reason?
Normally the posix.cc version is used on Solaris. solaris.cc is largely
a historical artifact left over from a time before Solaris supported
pthreads.
> To avoid the trouble, we comment the declaration in omnithread.h (line
> 642). Otherwise, a better solution should be to create the inner class
> instance at te omni_thead creation (singleton pattern). This is probably
> the aim of the static member omni_thread::init_t::count which avoid
> multiple instances.
It's important that omni_thread is initialised in the way it currently
is, because the things done in omni_thread::init_t::init_t() must happen
before anything else that uses omnithread. The only way that can be
ensured is to trigger it from everywhere that does #include
<omnithread.h>.
I have successfully run Purify on Solaris with omniORB in the past,
without having to change anything to do with omnithread, so it should be
possible to make it work.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list