Hi list,

I found a situation that I can't explain, I have qmail-ldap running
at some FreeBSD 6.2 without any problem. Friday after Installed a new
server this time with 7-STABLE. I stated to get core dumped from
qmail-ldap when they try access the OpenLDAP database.

I compiled/run this simple C program in 7-STABLE i386 and AMD64 and
the program dumps the core only in AMD64.

The following the C program trigger the core dump

#include
#include
#include
#include
#include
#include


int main (void ) {

LDAP *ld;
int rc,version;
version=3;

if ( (ld = ldap_init("127.0.0.1",LDAP_PORT)) == 0) {
perror("Connecting..");
}

rc = ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &version);

if ( rc != LDAP_OPT_SUCCESS) {

printf("Errorrrr (%s)\n", ldap_err2string(rc));
}

}

Using the following commands to compile:
# gcc -I/usr/local/include -g -c a.c
# gcc -L/usr/local/lib -o a a.o -lldap

When I run the binary in AMD64 I get this:

# ./a
Segmentation fault (core dumped)

Then I compiled the libldap.so with debug symbols and run the program
througth gdb:

# gdb a
GNU gdb 6.1.1
[FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
(gdb) run
Starting program: /tmp/a

Program received signal SIGSEGV, Segmentation fault.
ldap_set_option (ld=0xf30040, option=17, invalue=0x7fffffffec2c) at
options.c:358
358 assert( LDAP_VALID( ld ) );
(gdb) bt
#0 ldap_set_option (ld=0xf30040, option=17, invalue=0x7fffffffec2c)
at options.c:358
#1 0x000000000040083c in main () at a.c:19
(gdb)

Now I reach to a point that I don't know what more to do....

Any help is *very* appreciated !

Best Regards,

Alexandre
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/lis...freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"