[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Segmentation fault in s23_clnt.c when used in a library
- To: openldap-technical@openldap.org
- Subject: Segmentation fault in s23_clnt.c when used in a library
- From: Tobias Ljunggren <tljunggren@gmail.com>
- Date: Tue, 07 Oct 2014 17:06:03 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:disposition-notification-to:date:from:user-agent :mime-version:to:subject:content-type:content-transfer-encoding; bh=JnBUIi+8FvM/alsxrQMKuOktakXZ/JpLf84ZF5YVc8I=; b=zvmzgpEt3aQS0U6PbCDKfT837bN5b5rnUdDqmpQWYNggi/4KVQt6ZD7ng5JIjeFq/j 3FwscQIUD5boolPJZjVleIpDyLmEm7WNGgcAHSeejuknMBZRpjOEw3c59fK2I/En1Fqz V7O5JZuQBa8rEkhVN4AV65o05gW11YTaRcuBp8POtjfQGoryMCpn58d+P6Vqp3D3FcfN sY3KiaAoxEovFagmXrmh6c3cWHfvaWbvACOWcEWzYFn5Pbfn3kTbVHb9Vcvt5zo9f70n CcVYpyyKgy6l3y37TGHZICoZZnPN9DZ5jBDqLh5iO/7ntTL7Tst1qf6UAmj8D0XJ9det 6n1g==
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2
Hello,
I've been trying to track a segmentation fault for a couple of days but I'm running out of ideas and need some help or
suggestion on how to proceed.
Perhaps this is the wrong forum and if so I apologize. It's also worth mentioning that I don't have any knowledge about the
openSSL library source code but I've been working with ldap libraries for quite some time (about 10 years).
What I have is shared object (.so) that is loaded from another program (nothing I have control of) using a public API. My
library loads openLDAP (libldap_r and liblber) using dlopen/dlsym. After some initialization code I try to bind to a ldap source
(ldaps://ldaphost:636) but I get a segmentation fault in s23_clnt.c at line 159:
else if (s->ctx->info_callback != NULL)
For some reason s->ctx is a null pointer. My first thoughts was that I do something I shouldn't prior to ldap_sasl_bind_s which
corrupts the LDAP handle but after days with gdb and valgrind I still can't find anything.
openLDAP version used is 2.4.40 built with openSSL 1.0.1i.
If I copy the ldap code to a test executable it works fine.
Is there anything special to consider when loading the libraries from a shared object?
I understand that it is almost impossible to give me any good answers but since I'm a bit frustrated I hope someone can give me
some hints.
Best regards,
Tobias