Okay, the cause of this issue is now clear:
util_ald_create_caches() does not set 'newcurl' to anything when any of the caches are null, which they all are when they're sized at zero.
The fix is also simple: add an 'else newcurl = NULL;' after the 'if' block in this routine.

[This really drives home why I have developed in Java for the last 5 years after spending 7+ years doing C and C++.  This issue could not have occured in Java -- the compiler would have rejected the issue.  I'm not saying the extra speed, etc, due to Apache being written in C is not nice.  Nor due I wish to start some holy war.  It's just that the lack of pointer / memory allocation issues, uninitialized variables, and not having to produce one's own APR to deal with platforms make Java a much more productive place for me.]

--
Jess Holle

Jess Holle wrote:
Jess Holle wrote:
Here you go:
00000000()
util_ald_cache_fetch(util_ald_cache * 0x00a02cb8, void * 0x04c6de84) line 358 + 12 bytes
util_ldap_cache_checkuserid(request_rec * 0x6fb51341, util_ldap_connection_t * 0x00a5cdb0, const char * 0x00a02cf0, const char * 0x00880db0, int 9487736, char * * 0x00000002, const char * 0x00000000, const char * 0x04c6def4, const char * * 0x00a5eede, const char * * * 0x04c6dee8) line 785 + 22 bytes
mod_auth_ldap_check_user_id(request_rec * 0x6ff110bf) line 333
LIBHTTPD! 6ff110bf()
Note that none of the line numbers quite match as I've added comments in my source.  Thus the util_ald_cache_fetch() line is:
hashval = (*cache->hash)(payload) % cache->size;
While the util_ldap_cache_checkuserid() line is:
search_nodep = util_ald_cache_fetch(curl->search_cache, &the_search_node);
I was just about to patch around this by check cache->hash for null and returning null in this case from util_ald_cache_fetch(), but I'm all ears for a better fix.  I'm also all ears for a fix to the hang -- perhaps I can cull out a stack dump for that too...
Silly me - the hash field being null seems to indicate this structure is seriously munged -- just working around this one condition just moves along to the next crash.

--
Jess Holle

Reply via email to