dlopen() problems on OpenBSD 3.7 sparc64



My application defines a C++ base class which can then be implemented
and dynamically loaded using dlopen(). I've done this for years on
Linux (Fedora Core, Redhat, and Ubuntu) without any problems.

However, today I tested my application on OpenBSD 3.7 sparc64 and I am
experiencing bizarre problems with dynamically loaded libraries. The
actual location of the crash moves around as I edit the code, and the
error message printed to the shell also changes (sometimes it's a
segmentation fault, other times an illegal hardware instruction). I
wish I could use valgrind to test it, but sadly it isn't available for
this platform.

I boiled my application down to its absolute simplest form in order to
specifically test the dynamic loading functionality. I've tar'ed up
the test application and posted it on my website:
http://irotas.fastmail.fm/dltest.tgz

If you download an extract that, you can build it using the 'make.sh'
script. Afterwards, add your current directory to LD_LIBRARY_PATH and
run './dltest'

I'm very interested to see if this crashes for others as well. If you
have any ideas why it should be crashing like this, I'm all ears.

Thanks,
Adam
.



Relevant Pages