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

sl_free() name collision on Mac OS X (ITS#3092)



Full_Name: Jason Townsend
Version: 2.2.7
OS: Mac OS X 10.3.3
URL: 
Submission from: (NULL) (17.221.43.149)


It appears that there is a name collision between the sl_free() in libSystem on
Mac OS X and OpenLDAP's internal sl_free function (present in OpenLDAP 2.2.x).

http://developer.apple.com/documentation/Darwin/Reference/ManPages/html/sl_free.3.html

void
sl_free(StringList *sl, int freeall);

void
sl_free( void *ptr, void *ctx );

This is the resulting linker error:

ld: for architecture ppc
ld: warning multiple definitions of symbol _sl_free
sl_malloc.o definition of _sl_free in section (__TEXT,__text)
/usr/lib/libSystem.dylib(super.So) definition of _sl_free

Due to this issue, it is not possible to use flat namespace when running slapd
in the debugger, which is necessary to use libgmalloc or libMallocDebug to look
for buffer overflows or memory leaks.

Perhaps the OpenLDAP function could be renamed to avoid this collision?

-Jason