[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ldap_search_s segfaults (ITS#960)

BTW, i compiled with a bounds-checking memory library, and this is what it
turned up:

$ ./a.out 
About to search
malloc/free/realloc: clobbered space detected
Aborted (core dumped)

$ gdb a.out core
GNU gdb 19991004


(gdb) bt
#0  0x400514e1 in __kill () from /lib/libc.so.6
#1  0x400512ba in raise (sig=6) at ../sysdeps/posix/raise.c:27
#2  0x40052a82 in abort () at ../sysdeps/generic/abort.c:88
#3  0x8049dcb in malloc_user_error () at malloc.c:287
#4  0x804a825 in mem2chunk (mem=0x805e19c) at malloc.c:628
#5  0x804a399 in free (mem=0x805e19c) at malloc.c:1010
#6  0x804d596 in ldap_chase_referrals (ld=0x8059248, lr=0x805e1bc, 
    errstrp=0x805e1d8, hadrefp=0xbffff4e8) at request.c:774
#7  0x804e815 in read1msg (ld=0x8059248, msgid=2, all=1, sb=0x805e0bc, 
    lc=0x805dc04, result=0xbffff600) at result.c:338
#8  0x804e5b7 in wait4msg (ld=0x8059248, msgid=2, all=1, timeout=0x0, 
    result=0xbffff600) at result.c:232
#9  0x804e380 in ldap_result (ld=0x8059248, msgid=2, all=1, timeout=0x0, 
    result=0xbffff600) at result.c:117
#10 0x804b638 in ldap_search_s (ld=0x8059248, 
    base=0x8054888 "dc=thecobblershoppe,dc=com", scope=1, 
    filter=0x8054878 "(objectClass=*)", attrs=0x0, attrsonly=0,
    at search.c:627
#11 0x8049d86 in main (argc=1, argv=0xbffff674) at test.c:21