dlopen() problems on OpenBSD 3.7 sparc64 - BSD

This is a discussion on dlopen() problems on OpenBSD 3.7 sparc64 - BSD ; 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 ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: dlopen() problems on OpenBSD 3.7 sparc64

  1. 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

  2. Re: dlopen() problems on OpenBSD 3.7 sparc64

    On Fri, 23 Nov 2007 16:36:26 -0800, irotas wrote:

    > However, today I tested my application on OpenBSD 3.7 sparc64 and I am
    > experiencing bizarre problems...


    > 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.


    Adam,

    1. OpenBSD 3.7 has not been supported since April 30, 2006.

    2. Your make.sh script assumes bash, which is not part of the base OS.

    3. Your test ran without error on i386 -current here:

    $ env LD_LIBAKRARY_PATH=. ./dltest
    Loading module: libdltest_impl.so
    Loading symbol for maker function: CreateImplClass
    Creating object ...
    Executing object ...
    hello from ImplClass!

    Success!
    $

    --
    Replying directly will get you locally blacklisted.
    Change the address; use my first name in front of the @ if you want to
    communicate privately.


  3. Re: dlopen() problems on OpenBSD 3.7 sparc64

    On Nov 24, 9:18 am, Josh Grosse wrote:
    > On Fri, 23 Nov 2007 16:36:26 -0800, irotas wrote:
    > > However, today I tested my application on OpenBSD 3.7 sparc64 and I am
    > > experiencing bizarre problems...
    > > 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.

    >
    > Adam,
    >
    > 1. OpenBSD 3.7 has not been supported since April 30, 2006.
    >
    > 2. Your make.sh script assumes bash, which is not part of the base OS.
    >
    > 3. Your test ran without error on i386 -current here:
    >
    > $ env LD_LIBAKRARY_PATH=. ./dltest
    > Loading module: libdltest_impl.so
    > Loading symbol for maker function: CreateImplClass
    > Creating object ...
    > Executing object ...
    > hello from ImplClass!
    >
    > Success!
    > $
    >
    > --
    > Replying directly will get you locally blacklisted.
    > Change the address; use my first name in front of the @ if you want to
    > communicate privately.


    Hi Josh,

    Thanks for the reply. Of course, OpenBSD 3.7 is old and unsupported.
    The only reason I used it was because it's the only 64-bit big-endian
    box I have access to for testing my application. Sadly, it's not my
    box to upgrade, so I work with what is available.

    My apologies for assuming bash; I forgot that the BSD variants don't
    install it by default. A simple change to /bin/sh should work.

    That's interesting that the test application worked for you. I guess
    that shows that either there was a bug in OpenBSD 3.7 related to
    dlopen(), or that this particular box I'm testing on is somehow
    misconfigured.

    Thanks again,
    Adam

  4. Re: dlopen() problems on OpenBSD 3.7 sparc64

    In article <7e6eadbd-84c4-4257-9bb7-0fe9aa5f8e47@d61g2000hsa.googlegroups.com>,
    irotas wrote:

    >Thanks for the reply. Of course, OpenBSD 3.7 is old and unsupported.
    >The only reason I used it was because it's the only 64-bit big-endian
    >box I have access to for testing my application. Sadly, it's not my
    >box to upgrade, so I work with what is available.
    >
    >My apologies for assuming bash; I forgot that the BSD variants don't
    >install it by default. A simple change to /bin/sh should work.
    >
    >That's interesting that the test application worked for you. I guess
    >that shows that either there was a bug in OpenBSD 3.7 related to
    >dlopen(), or that this particular box I'm testing on is somehow
    >misconfigured.


    When 3.7 came out, sparc64 support was still fairly young.

    The guy who runs that box really should update, if he does anything
    with that machine.

    That dlopen() issue you stumbled into is just the tip of the iceberg...

+ Reply to Thread