Comment 6 for bug 1574270

Revision history for this message
Yann E. MORIN (yann-morin-1998-r) wrote :

After a bit more investigation, I hacked tsocks to spit out debug log in its _init() function:

    FILE *f = fopen( "/home/me/tsocks.msg", "a+" );
    fprintf( "[%s] Hello world\n", program_invocation_name );
    fclose( f );

However, when running:

    $ tsocks ssh machine
    Segmentation fault

The .msg file is *not* created at all!

So, it seems something is trying to initialise openSSL before calling the _init() from tsocks...

So, I tried with another program *not* linked with openSSL. I used curl, which is linked with GnuTLS:

    $ curl https://example.com/
    [works!]

Conclusion: openSSL does get initialised before tsocks. That's really weird, as tsocks is in LD_PRELOAD,
so should come before any shared library from a NEEDED tag.

/me is now investigating the linker documentation to understand what's goign on...