httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Pane <>
Subject Re: [PATCH] mod_mime.c core dumps with no AddType
Date Wed, 22 Aug 2001 22:52:42 GMT
William A. Rowe, Jr. wrote:

>From: "sterling" <>
>>It appears that the extension_mappings hash is initialized to null, then
>>only instanciated if there is an AddType call in your conf file.  Hence in
>>the type_checker phase it tries to perform a lookup on a null hash.
>>this patch should fix the crash, but IMHO by that point the
>>extension_mappings hash should just be empty, not null (i.e. it should be
>>initialized to apr_hash_make) --
>No ... it should not.
>Even an empty hash must be merged in merge_per_dir_configs ... and that's
>very time consuming.
There's no need to merge an empty hash.  If you're optimizing away the
merge in the case where the pointer to the hash table is NULL, the same
optimization is applicable in the case where the hash table exists but
is empty (apr_hash_count() takes O(1) time).


View raw message