So, here is a patch to fix the issue with the GNU build attached. An
essential part of NLM dump (unfixed) shows the problem:
DATA:00012BA0 = config_log_module
DATA:00012C20 = asis_module
DATA:00012CA0 = imap_module
DATA:00012DA0 = setenvif_module
---
DATA:00013DF0 = ap_server_post_read_config
DATA:00013E20 = ap_server_config_defines
DATA:00013E60 = ap_coredump_dir
DATA:00015E60 = ap_lock_fname
DATA:00015E80 = ap_bind_address
DATA:00015F60 = ap_server_pre_read_config
Data Size: 00013220 ( 78368)
All records with offset outside of data size boundary are causing this:
SERVER-5.00-1554: Invalid public record offset in load file.
Module APACHEC.NLM NOT loaded
I'm using the ApacheCore.imp as export file when building apachec.nlm
and suppose it's correct bahaviour...
Pavel
P.S.: An enhancement of the nlmconv utility is much accurate than "fix",
that's what I exactly meant.
Pavel Novy wrote:
> Tested those new changes on build with the GNU tools and it seems that
> there is a problem with new ApacheCore.imp file. It's not a new one - a
> nlmconv utility used here for NLM linking is not able to allocate a
> physical space for uninitialized variables, so if any of such symbols is
> exported (nlmconv doesn't produce any warning), it's not possible to
> load a NLM module, then. The core module (apachec.nlm) is affected and
> the only way to fix this is to change those uninitialized variables to
> initialized (yes, we also could ask for fix in the nlmconv utility, but
> it's much harder). I will take a look which variable(s) is(are) causing
> this and will let you know.
>
> Pavel
--- original/src/main/http_main.c Fri Dec 28 06:12:03 2001
+++ modified/src/main/http_main.c Thu Jan 3 05:25:20 2002
@@ -247,9 +247,9 @@
API_VAR_EXPORT int ap_excess_requests_per_child=0;
API_VAR_EXPORT char *ap_pid_fname=NULL;
API_VAR_EXPORT char *ap_scoreboard_fname=NULL;
-API_VAR_EXPORT char *ap_lock_fname;
+API_VAR_EXPORT char *ap_lock_fname=NULL;
API_VAR_EXPORT char *ap_server_argv0=NULL;
-API_VAR_EXPORT struct in_addr ap_bind_address;
+API_VAR_EXPORT struct in_addr ap_bind_address={};
API_VAR_EXPORT int ap_daemons_to_start=0;
API_VAR_EXPORT int ap_daemons_min_free=0;
API_VAR_EXPORT int ap_daemons_max_free=0;
@@ -309,11 +309,11 @@
API_VAR_EXPORT char ap_server_root[MAX_STRING_LEN]="";
API_VAR_EXPORT char ap_server_confname[MAX_STRING_LEN]="";
-API_VAR_EXPORT char ap_coredump_dir[MAX_STRING_LEN];
+API_VAR_EXPORT char ap_coredump_dir[MAX_STRING_LEN]="";
-API_VAR_EXPORT array_header *ap_server_pre_read_config;
-API_VAR_EXPORT array_header *ap_server_post_read_config;
-API_VAR_EXPORT array_header *ap_server_config_defines;
+API_VAR_EXPORT array_header *ap_server_pre_read_config=NULL;
+API_VAR_EXPORT array_header *ap_server_post_read_config=NULL;
+API_VAR_EXPORT array_header *ap_server_config_defines=NULL;
/* *Non*-shared http_main globals... */