expcov report - Generated Sat Oct 15 21:39:18 2016

 Index  Statistics  Last 
Directory./modules/mappers
Filenamemod_so.c
ModifiedThu Dec 18 10:46:00 2008

Pass Half Fail Excluded Total
Function
2
28.57%
5
71.43%
0
0.00%
7
100%
Expressions
5
3.36%
144
96.64%
0
0.00%
149
100%
Conditions
0
0.00%
0
0.00%
22
100.00%
0
0.00%
22
100%
MC/DC
0
0.00%
4
100.00%
0
0.00%
4
100%
Branches

if
0
0.00%
0
0.00%
18
100.00%
0
0.00%
18
100%
for
0
0.00%
0
0.00%
4
100.00%
0
0.00%
4
100%
while
0
0.00%
0
0.00%
0
0.00%
0
0.00%
0
100%
case
0
0.00%
0
0.00%
0
0.00%
0
0.00%
0
100%

1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements.  See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License.  You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * This module is used to load Apache modules at runtime. This means that the
19 * server functionality can be extended without recompiling and even without
20 * taking the server down at all. Only a HUP or AP_SIG_GRACEFUL signal
21 * needs to be sent to the server to reload the dynamically loaded modules.
22 *
23 * To use, you'll first need to build your module as a shared library, then
24 * update your configuration (httpd.conf) to get the Apache core to load the
25 * module at start-up.
26 *
27 * The easiest way to build a module as a shared library is to use the
28 * `SharedModule' command in the Configuration file, instead of `AddModule'.
29 * You should also change the file extension from `.o' to `.so'. So, for
30 * example, to build the status module as a shared library edit Configuration
31 * and change
32 *   AddModule    modules/standard/mod_status.o
33 * to
34 *   SharedModule modules/standard/mod_status.so
35 *
36 * Run Configure and make. Now Apache's httpd binary will _not_ include
37 * mod_status. Instead a shared object called mod_status.so will be build, in
38 * the modules/standard directory. You can build most of the modules as shared
39 * libraries like this.
40 *
41 * To use the shared module, move the .so file(s) into an appropriate
42 * directory. You might like to create a directory called "modules" under you
43 * server root for this (e.g. /usr/local/httpd/modules).
44 *
45 * Then edit your conf/httpd.conf file, and add LoadModule lines. For
46 * example
47 *   LoadModule  status_module   modules/mod_status.so
48 *
49 * The first argument is the module's structure name (look at the end of the
50 * module source to find this). The second option is the path to the module
51 * file, relative to the server root.  Put these directives right at the top
52 * of your httpd.conf file.
53 *
54 * Now you can start Apache. A message will be logged at "debug" level to your
55 * error_log to confirm that the module(s) are loaded (use "LogLevel debug"
56 * directive to get these log messages).
57 *
58 * If you edit the LoadModule directives while the server is live you can get
59 * Apache to re-load the modules by sending it a HUP or AP_SIG_GRACEFUL
60 * signal as normal.  You can use this to dynamically change the capability
61 * of your server without bringing it down.
62 *
63 * Because currently there is only limited builtin support in the Configure
64 * script for creating the shared library files (`.so'), please consult your
65 * vendors cc(1), ld(1) and dlopen(3) manpages to find out the appropriate
66 * compiler and linker flags and insert them manually into the Configuration
67 * file under CFLAGS_SHLIB, LDFLAGS_SHLIB and LDFLAGS_SHLIB_EXPORT.
68 *
69 * If you still have problems figuring out the flags both try the paper
70 *     http://developer.netscape.com/library/documentation/enterprise
71 *                                          /unix/svrplug.htm#1013807
72 * or install a Perl 5 interpreter on your platform and then run the command
73 *
74 *     $ perl -V:usedl -V:ccdlflags -V:cccdlflags -V:lddlflags
75 *
76 * This gives you what type of dynamic loading Perl 5 uses on your platform
77 * and which compiler and linker flags Perl 5 uses to create the shared object
78 * files.
79 *
80 * Another location where you can find useful hints is the `ltconfig' script
81 * of the GNU libtool 1.2 package. Search for your platform name inside the
82 * various "case" constructs.
83 *
84 */
85
86#include "apr.h"
87#include "apr_dso.h"
88#include "apr_strings.h"
89#include "apr_errno.h"
90
91#define CORE_PRIVATE
92#include "ap_config.h"
93#include "httpd.h"
94#include "http_config.h"
95#include "http_log.h"
96#include "http_core.h"
97
98#include "mod_so.h"
99
100module AP_MODULE_DECLARE_DATA so_module;
101
102
103/*
104 * Server configuration to keep track of actually
105 * loaded modules and the corresponding module name.
106 */
107
108typedef struct so_server_conf {
109    apr_array_header_t *loaded_modules;
110} so_server_conf;
111
112static void *so_sconf_create : call=1
s
o_sconf_create(apr_pool_t *p, server_rec *s)
113{
114    so_server_conf *soc;
115
116    soc : modules/mappers/mod_so.c line=114 column=21
s
oc = : pass=1
=
 (so_server_conf *)apr_pcalloc(p : modules/mappers/mod_so.c line=112 column=42
p
, sizeof(so_server_conf));
117    soc : modules/mappers/mod_so.c line=114 column=21
s
oc-> : enter=1, leave=1
-
>loaded_modules : modules/mappers/mod_so.c line=109 column=25
l
oaded_modules = : enter=1, leave=1
=
 apr_array_make : enter=1, leave=1

apr_array_make : /usr/include/apr-1/apr_tables.h line=111 column=35
a
pr_array_make(p : modules/mappers/mod_so.c line=112 column=42
p
, DYNAMIC_MODULE_LIMIT,
118                                     sizeof(ap_module_symbol_t));
119
120    return : pass=1
r
eturn (void *)soc : modules/mappers/mod_so.c line=114 column=21
s
oc;
121}
122
123#ifndef NO_DLOPEN
124
125/*
126 * This is the cleanup for a loaded shared object. It unloads the module.
127 * This is called as a cleanup function from the core.
128 */
129
130static apr_status_t unload_module : call=0
u
nload_module(void *data)
131{
132    ap_module_symbol_t *modi = (ap_module_symbol_t*)data : modules/mappers/mod_so.c line=130 column=41
d
ata;
133
134    /* only unload if module information is still existing */
135    if : true=0, false=0
i
f (modi : modules/mappers/mod_so.c line=132 column=25
m
odi-> : enter=0, leave=0
-
>modp : include/http_config.h line=732 column=13
m
odp == : true=0, false=0
=
= NULL)
136        return : pass=0
r
eturn APR_SUCCESS;
137
138    /* remove the module pointer from the core structure */
139    ap_remove_loaded_module : enter=0, leave=0

ap_remove_loaded_module : include/http_config.h line=587 column=18
a
p_remove_loaded_module(modi : modules/mappers/mod_so.c line=132 column=25
m
odi-> : enter=0, leave=0
-
>modp : include/http_config.h line=732 column=13
m
odp);
140
141    /* destroy the module information */
142    modi : modules/mappers/mod_so.c line=132 column=25
m
odi-> : enter=0, leave=0
-
>modp : include/http_config.h line=732 column=13
m
odp = : enter=0, leave=0
=
 NULL;
143    modi : modules/mappers/mod_so.c line=132 column=25
m
odi-> : enter=0, leave=0
-
>name : include/http_config.h line=731 column=17
n
ame = : enter=0, leave=0
=
 NULL;
144    return : pass=0
r
eturn APR_SUCCESS;
145}
146
147/*
148 * This is called for the directive LoadModule and actually loads
149 * a shared object file into the address space of the server process.
150 */
151
152static const char *load_module : call=0
l
oad_module(cmd_parms *cmd, void *dummy,
153                               const char *modname, const char *filename)
154{
155    apr_dso_handle_t *modhandle;
156    apr_dso_handle_sym_t modsym;
157    module *modp;
158    const char *szModuleFile = ap_server_root_relative : enter=0, leave=0

ap_server_root_relative : include/http_config.h line=557 column=20
a
p_server_root_relative(cmd : modules/mappers/mod_so.c line=152 column=43
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, filename : modules/mappers/mod_so.c line=153 column=65
f
ilename);
159    so_server_conf *sconf;
160    ap_module_symbol_t *modi;
161    ap_module_symbol_t *modie;
162    int i;
163    const char *error;
164
165    /* we need to setup this value for dummy to make sure that we don't try
166     * to add a non-existant tree into the build when we return to
167     * execute_now.
168     */
169    *(ap_directive_t **)dummy : modules/mappers/mod_so.c line=152 column=54
d
ummy = : enter=0, leave=0
=
 NULL;
170
171    if : true=0, false=0
i
f (! : true=0, false=0
!
szModuleFile : modules/mappers/mod_so.c line=158 column=17
s
zModuleFile) {
172        return : pass=0
r
eturn apr_pstrcat : enter=0, leave=0

apr_pstrcat : /usr/include/apr-1/apr_strings.h line=139 column=28
a
pr_pstrcat(cmd : modules/mappers/mod_so.c line=152 column=43
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, "Invalid LoadModule path ",
173                           filename : modules/mappers/mod_so.c line=153 column=65
f
ilename, NULL);
174    }
175
176    /*
177     * check for already existing module
178     * If it already exists, we have nothing to do
179     * Check both dynamically-loaded modules and statically-linked modules.
180     */
181    sconf : modules/mappers/mod_so.c line=159 column=21
s
conf = : pass=0
=
 (so_server_conf *)ap_get_module_config(cmd : modules/mappers/mod_so.c line=152 column=43
c
md-> : enter=0, leave=0
-
>server : include/http_config.h line=296 column=17
s
erver-> : enter=0, leave=0
-
>module_config : include/httpd.h line=1207 column=30
m
odule_config,
182                                                &so_module : modules/mappers/mod_so.c line=100 column=31
s
o_module);
183    modie : modules/mappers/mod_so.c line=161 column=25
m
odie = : pass=0
=
 (ap_module_symbol_t *)sconf : modules/mappers/mod_so.c line=159 column=21
s
conf-> : enter=0, leave=0
-
>loaded_modules : modules/mappers/mod_so.c line=109 column=25
l
oaded_modules-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
184    for : true=0, false=0
f
or (i : modules/mappers/mod_so.c line=162 column=9
i
 = : pass=0
=
 0; i : modules/mappers/mod_so.c line=162 column=9
i
 < : true=0, false=0
<
 sconf : modules/mappers/mod_so.c line=159 column=21
s
conf-> : enter=0, leave=0
-
>loaded_modules : modules/mappers/mod_so.c line=109 column=25
l
oaded_modules-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; i : modules/mappers/mod_so.c line=162 column=9
i
++ : pass=0
+
+) {
185        modi : modules/mappers/mod_so.c line=160 column=25
m
odi = : pass=0
=
 &modie : modules/mappers/mod_so.c line=161 column=25
m
odie[] : enter=0, leave=0
[
i : modules/mappers/mod_so.c line=162 column=9
i
];
186        if : true=0, false=0
i
f (modi : modules/mappers/mod_so.c line=160 column=25
m
odi-> : enter=0, leave=0
-
>name : include/http_config.h line=731 column=17
n
ame != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= NULL && : true=0, false=0
&
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(modi : modules/mappers/mod_so.c line=160 column=25
m
odi-> : enter=0, leave=0
-
>name : include/http_config.h line=731 column=17
n
ame, modname : modules/mappers/mod_so.c line=153 column=44
m
odname) == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0) {
187            ap_log_perror : enter=0, leave=0

ap_log_perror : include/http_log.h line=195 column=18
a
p_log_perror(APLOG_MARK, APLOG_WARNING, 0,
188                          cmd : modules/mappers/mod_so.c line=152 column=43
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, "module %s is already loaded, skipping",
189                          modname : modules/mappers/mod_so.c line=153 column=44
m
odname);
190            return : pass=0
r
eturn NULL;
191        }
192    }
193
194    for : true=0, false=0
f
or (i : modules/mappers/mod_so.c line=162 column=9
i
 = : pass=0
=
 0; ap_preloaded_modules : include/http_config.h line=755 column=32
a
p_preloaded_modules[] : enter=0, leave=0
[
i : modules/mappers/mod_so.c line=162 column=9
i
]; i : modules/mappers/mod_so.c line=162 column=9
i
++ : pass=0
+
+) {
195        const char *preload_name;
196        apr_size_t preload_len;
197        apr_size_t thismod_len;
198
199        modp : modules/mappers/mod_so.c line=157 column=13
m
odp = : pass=0
=
 ap_preloaded_modules : include/http_config.h line=755 column=32
a
p_preloaded_modules[] : enter=0, leave=0
[
i : modules/mappers/mod_so.c line=162 column=9
i
];
200
201        /* make sure we're comparing apples with apples
202         * make sure name of preloaded module is mod_FOO.c
203         * make sure name of structure being loaded is FOO_module
204         */
205
206        if : true=0, false=0
i
f (memcmp : enter=0, leave=0

memcmp : /usr/include/string.h line=68 column=12
m
emcmp(modp : modules/mappers/mod_so.c line=157 column=13
m
odp-> : enter=0, leave=0
-
>name : include/http_config.h line=334 column=17
n
ame, "mod_", 4)) {
207            continue : pass=0
c
ontinue;
208        }
209
210        preload_name : modules/mappers/mod_so.c line=195 column=21
p
reload_name = : pass=0
=
 modp : modules/mappers/mod_so.c line=157 column=13
m
odp-> : enter=0, leave=0
-
>name : include/http_config.h line=334 column=17
n
ame + : pass=0
+
 strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen("mod_");
211        preload_len : modules/mappers/mod_so.c line=196 column=20
p
reload_len = : pass=0
=
 strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen(preload_name : modules/mappers/mod_so.c line=195 column=21
p
reload_name) - : pass=0
-
 2;
212
213        if : true=0, false=0
i
f (strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen(modname : modules/mappers/mod_so.c line=153 column=44
m
odname) <= : true=0, false=0
<
strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen("_module")) {
214            continue : pass=0
c
ontinue;
215        }
216        thismod_len : modules/mappers/mod_so.c line=197 column=20
t
hismod_len = : pass=0
=
 strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen(modname : modules/mappers/mod_so.c line=153 column=44
m
odname) - : pass=0
-
 strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen("_module");
217        if : true=0, false=0
i
f (strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(modname : modules/mappers/mod_so.c line=153 column=44
m
odname + : pass=0
+
 thismod_len : modules/mappers/mod_so.c line=197 column=20
t
hismod_len, "_module")) {
218            continue : pass=0
c
ontinue;
219        }
220
221        if : true=0, false=0
i
f (thismod_len : modules/mappers/mod_so.c line=197 column=20
t
hismod_len != : true=0, false=0
!
preload_len : modules/mappers/mod_so.c line=196 column=20
p
reload_len) {
222            continue : pass=0
c
ontinue;
223        }
224
225        if : true=0, false=0
i
f (! : true=0, false=0
!
memcmp : enter=0, leave=0

memcmp : /usr/include/string.h line=68 column=12
m
emcmp(modname : modules/mappers/mod_so.c line=153 column=44
m
odname, preload_name : modules/mappers/mod_so.c line=195 column=21
p
reload_name, preload_len : modules/mappers/mod_so.c line=196 column=20
p
reload_len)) {
226            return : pass=0
r
eturn apr_pstrcat : enter=0, leave=0

apr_pstrcat : /usr/include/apr-1/apr_strings.h line=139 column=28
a
pr_pstrcat(cmd : modules/mappers/mod_so.c line=152 column=43
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, "module ", modname : modules/mappers/mod_so.c line=153 column=44
m
odname,
227                               " is built-in and can't be loaded",
228                               NULL);
229        }
230    }
231
232    modi : modules/mappers/mod_so.c line=160 column=25
m
odi = : pass=0
=
 apr_array_push : enter=0, leave=0

apr_array_push : /usr/include/apr-1/apr_tables.h line=121 column=21
a
pr_array_push(sconf : modules/mappers/mod_so.c line=159 column=21
s
conf-> : enter=0, leave=0
-
>loaded_modules : modules/mappers/mod_so.c line=109 column=25
l
oaded_modules);
233    modi : modules/mappers/mod_so.c line=160 column=25
m
odi-> : enter=0, leave=0
-
>name : include/http_config.h line=731 column=17
n
ame = : enter=0, leave=0
=
 modname : modules/mappers/mod_so.c line=153 column=44
m
odname;
234
235    /*
236     * Load the file into the Apache address space
237     */
238    if : true=0, false=0
i
f (apr_dso_load : enter=0, leave=0

apr_dso_load : /usr/include/apr-1/apr_dso.h line=59 column=27
a
pr_dso_load(&modhandle : modules/mappers/mod_so.c line=155 column=23
m
odhandle, szModuleFile : modules/mappers/mod_so.c line=158 column=17
s
zModuleFile, cmd : modules/mappers/mod_so.c line=152 column=43
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool) != : true=0, false=0
!
= APR_SUCCESS) {
239        char my_error[256];
240
241        return : pass=0
r
eturn apr_pstrcat : enter=0, leave=0

apr_pstrcat : /usr/include/apr-1/apr_strings.h line=139 column=28
a
pr_pstrcat(cmd : modules/mappers/mod_so.c line=152 column=43
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, "Cannot load ", szModuleFile : modules/mappers/mod_so.c line=158 column=17
s
zModuleFile,
242                          " into server: ",
243                          apr_dso_error : enter=0, leave=0

apr_dso_error : /usr/include/apr-1/apr_dso.h line=84 column=27
a
pr_dso_error(modhandle : modules/mappers/mod_so.c line=155 column=23
m
odhandle, my_error : modules/mappers/mod_so.c line=239 column=14
m
y_error, sizeof(my_error)),
244                          NULL);
245    }
246    ap_log_perror : enter=0, leave=0

ap_log_perror : include/http_log.h line=195 column=18
a
p_log_perror(APLOG_MARK, APLOG_DEBUG, 0, cmd : modules/mappers/mod_so.c line=152 column=43
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool,
247                 "loaded module %s", modname : modules/mappers/mod_so.c line=153 column=44
m
odname);
248
249    /*
250     * Retrieve the pointer to the module structure through the module name:
251     * First with the hidden variant (prefix `AP_') and then with the plain
252     * symbol name.
253     */
254    if : true=0, false=0
i
f (apr_dso_sym : enter=0, leave=0

apr_dso_sym : /usr/include/apr-1/apr_dso.h line=74 column=27
a
pr_dso_sym(&modsym : modules/mappers/mod_so.c line=156 column=26
m
odsym, modhandle : modules/mappers/mod_so.c line=155 column=23
m
odhandle, modname : modules/mappers/mod_so.c line=153 column=44
m
odname) != : true=0, false=0
!
= APR_SUCCESS) {
255        char my_error[256];
256
257        return : pass=0
r
eturn apr_pstrcat : enter=0, leave=0

apr_pstrcat : /usr/include/apr-1/apr_strings.h line=139 column=28
a
pr_pstrcat(cmd : modules/mappers/mod_so.c line=152 column=43
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, "Can't locate API module structure `",
258                          modname : modules/mappers/mod_so.c line=153 column=44
m
odname, "' in file ", szModuleFile : modules/mappers/mod_so.c line=158 column=17
s
zModuleFile, ": ",
259                          apr_dso_error : enter=0, leave=0

apr_dso_error : /usr/include/apr-1/apr_dso.h line=84 column=27
a
pr_dso_error(modhandle : modules/mappers/mod_so.c line=155 column=23
m
odhandle, my_error : modules/mappers/mod_so.c line=255 column=14
m
y_error, sizeof(my_error)),
260                          NULL);
261    }
262    modp : modules/mappers/mod_so.c line=157 column=13
m
odp = : pass=0
=
 (module*) modsym : modules/mappers/mod_so.c line=156 column=26
m
odsym;
263    modp : modules/mappers/mod_so.c line=157 column=13
m
odp-> : enter=0, leave=0
-
>dynamic_load_handle : include/http_config.h line=336 column=11
d
ynamic_load_handle = : enter=0, leave=0
=
 (apr_dso_handle_t *)modhandle : modules/mappers/mod_so.c line=155 column=23
m
odhandle;
264    modi : modules/mappers/mod_so.c line=160 column=25
m
odi-> : enter=0, leave=0
-
>modp : include/http_config.h line=732 column=13
m
odp = : enter=0, leave=0
=
 modp : modules/mappers/mod_so.c line=157 column=13
m
odp;
265
266    /*
267     * Make sure the found module structure is really a module structure
268     *
269     */
270    if : true=0, false=0
i
f (modp : modules/mappers/mod_so.c line=157 column=13
m
odp-> : enter=0, leave=0
-
>magic : include/http_config.h line=344 column=19
m
agic != : true=0, false=0
!
= MODULE_MAGIC_COOKIE) {
271        return : pass=0
r
eturn apr_psprintf : enter=0, leave=0

apr_psprintf : /usr/include/apr-1/apr_strings.h line=170 column=28
a
pr_psprintf(cmd : modules/mappers/mod_so.c line=152 column=43
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, "API module structure '%s' in file %s "
272                            "is garbled - expected signature %08lx but saw "
273                            "%08lx - perhaps this is not an Apache module DSO, "
274                            "or was compiled for a different Apache version?",
275                            modname : modules/mappers/mod_so.c line=153 column=44
m
odname, szModuleFile : modules/mappers/mod_so.c line=158 column=17
s
zModuleFile, 
276                            MODULE_MAGIC_COOKIE, modp : modules/mappers/mod_so.c line=157 column=13
m
odp-> : enter=0, leave=0
-
>magic : include/http_config.h line=344 column=19
m
agic);
277    }
278
279    /*
280     * Add this module to the Apache core structures
281     */
282    error : modules/mappers/mod_so.c line=163 column=17
e
rror = : pass=0
=
 ap_add_loaded_module : enter=0, leave=0

ap_add_loaded_module : include/http_config.h line=582 column=26
a
p_add_loaded_module(modp : modules/mappers/mod_so.c line=157 column=13
m
odp, cmd : modules/mappers/mod_so.c line=152 column=43
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool);
283    if : true=0, false=0
i
f (error : modules/mappers/mod_so.c line=163 column=17
e
rror) {
284        return : pass=0
r
eturn error : modules/mappers/mod_so.c line=163 column=17
e
rror;
285    }
286
287    /*
288     * Register a cleanup in the config apr_pool_t (normally pconf). When
289     * we do a restart (or shutdown) this cleanup will cause the
290     * shared object to be unloaded.
291     */
292    apr_pool_cleanup_register : enter=0, leave=0

apr_pool_cleanup_register : /usr/include/apr-1/apr_pools.h line=603 column=19
a
pr_pool_cleanup_register(cmd : modules/mappers/mod_so.c line=152 column=43
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, modi : modules/mappers/mod_so.c line=160 column=25
m
odi, unload_module : modules/mappers/mod_so.c line=130 column=21
u
nload_module, apr_pool_cleanup_null : /usr/include/apr-1/apr_pools.h line=682 column=34 apr_pool_cleanup_null);
293
294    /*
295     * Finally we need to run the configuration process for the module
296     */
297    ap_single_module_configure : enter=0, leave=0

ap_single_module_configure : include/http_config.h line=768 column=18
a
p_single_module_configure(cmd : modules/mappers/mod_so.c line=152 column=43
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, cmd : modules/mappers/mod_so.c line=152 column=43
c
md-> : enter=0, leave=0
-
>server : include/http_config.h line=296 column=17
s
erver, modp : modules/mappers/mod_so.c line=157 column=13
m
odp);
298
299    return : pass=0
r
eturn NULL;
300}
301
302/*
303 * This implements the LoadFile directive and loads an arbitrary
304 * shared object file into the adress space of the server process.
305 */
306
307static const char *load_file : call=0
l
oad_file(cmd_parms *cmd, void *dummy, const char *filename)
308{
309    apr_dso_handle_t *handle;
310    const char *file;
311
312    file : modules/mappers/mod_so.c line=310 column=17
f
ile = : pass=0
=
 ap_server_root_relative : enter=0, leave=0

ap_server_root_relative : include/http_config.h line=557 column=20
a
p_server_root_relative(cmd : modules/mappers/mod_so.c line=307 column=41
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, filename : modules/mappers/mod_so.c line=307 column=71
f
ilename);
313
314    if : true=0, false=0
i
f (! : true=0, false=0
!
file : modules/mappers/mod_so.c line=310 column=17
f
ile) {
315        return : pass=0
r
eturn apr_pstrcat : enter=0, leave=0

apr_pstrcat : /usr/include/apr-1/apr_strings.h line=139 column=28
a
pr_pstrcat(cmd : modules/mappers/mod_so.c line=307 column=41
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, "Invalid LoadFile path ",
316                           filename : modules/mappers/mod_so.c line=307 column=71
f
ilename, NULL);
317    }
318
319    if : true=0, false=0
i
f (apr_dso_load : enter=0, leave=0

apr_dso_load : /usr/include/apr-1/apr_dso.h line=59 column=27
a
pr_dso_load(&handle : modules/mappers/mod_so.c line=309 column=23
h
andle, file : modules/mappers/mod_so.c line=310 column=17
f
ile, cmd : modules/mappers/mod_so.c line=307 column=41
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool) != : true=0, false=0
!
= APR_SUCCESS) {
320        char my_error[256];
321
322        return : pass=0
r
eturn apr_pstrcat : enter=0, leave=0

apr_pstrcat : /usr/include/apr-1/apr_strings.h line=139 column=28
a
pr_pstrcat(cmd : modules/mappers/mod_so.c line=307 column=41
c
md-> : enter=0, leave=0
-
>pool : include/http_config.h line=291 column=17
p
ool, "Cannot load ", filename : modules/mappers/mod_so.c line=307 column=71
f
ilename,
323                          " into server: ",
324                          apr_dso_error : enter=0, leave=0

apr_dso_error : /usr/include/apr-1/apr_dso.h line=84 column=27
a
pr_dso_error(handle : modules/mappers/mod_so.c line=309 column=23
h
andle, my_error : modules/mappers/mod_so.c line=320 column=14
m
y_error, sizeof(my_error)),
325                          NULL);
326    }
327
328    ap_log_error : enter=0, leave=0

ap_log_error : include/http_log.h line=171 column=18
a
p_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL,
329                 "loaded file %s", filename : modules/mappers/mod_so.c line=307 column=71
f
ilename);
330
331    return : pass=0
r
eturn NULL;
332}
333
334static module *ap_find_loaded_module_symbol : call=0
a
p_find_loaded_module_symbol(server_rec *s, const char *modname)
335{
336    so_server_conf *sconf;
337    ap_module_symbol_t *modi;
338    ap_module_symbol_t *modie;
339    int i;
340
341    sconf : modules/mappers/mod_so.c line=336 column=21
s
conf = : pass=0
=
 (so_server_conf *)ap_get_module_config(s : modules/mappers/mod_so.c line=334 column=57
s
-> : enter=0, leave=0
-
>module_config : include/httpd.h line=1207 column=30
m
odule_config,
342                                                   &so_module : modules/mappers/mod_so.c line=100 column=31
s
o_module);
343    modie : modules/mappers/mod_so.c line=338 column=25
m
odie = : pass=0
=
 (ap_module_symbol_t *)sconf : modules/mappers/mod_so.c line=336 column=21
s
conf-> : enter=0, leave=0
-
>loaded_modules : modules/mappers/mod_so.c line=109 column=25
l
oaded_modules-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
344
345    for : true=0, false=0
f
or (i : modules/mappers/mod_so.c line=339 column=9
i
 = : pass=0
=
 0; i : modules/mappers/mod_so.c line=339 column=9
i
 < : true=0, false=0
<
 sconf : modules/mappers/mod_so.c line=336 column=21
s
conf-> : enter=0, leave=0
-
>loaded_modules : modules/mappers/mod_so.c line=109 column=25
l
oaded_modules-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; i : modules/mappers/mod_so.c line=339 column=9
i
++ : pass=0
+
+) {
346        modi : modules/mappers/mod_so.c line=337 column=25
m
odi = : pass=0
=
 &modie : modules/mappers/mod_so.c line=338 column=25
m
odie[] : enter=0, leave=0
[
i : modules/mappers/mod_so.c line=339 column=9
i
];
347        if : true=0, false=0
i
f (modi : modules/mappers/mod_so.c line=337 column=25
m
odi-> : enter=0, leave=0
-
>name : include/http_config.h line=731 column=17
n
ame != : true=0, false=0
MC/DC independently affect : true=0, false=0
!TF
= NULL && : true=0, false=0
&
strcmp : enter=0, leave=0

strcmp : /usr/include/string.h line=143 column=12
s
trcmp(modi : modules/mappers/mod_so.c line=337 column=25
m
odi-> : enter=0, leave=0
-
>name : include/http_config.h line=731 column=17
n
ame, modname : modules/mappers/mod_so.c line=334 column=72
m
odname) == : true=0, false=0
MC/DC independently affect : true=0, false=0
=TF
= 0) {
348            return : pass=0
r
eturn modi : modules/mappers/mod_so.c line=337 column=25
m
odi-> : enter=0, leave=0
-
>modp : include/http_config.h line=732 column=13
m
odp;
349        }
350    }
351    return : pass=0
r
eturn NULL;
352}
353
354static void dump_loaded_modules : call=0
d
ump_loaded_modules(apr_pool_t *p, server_rec *s)
355{
356    ap_module_symbol_t *modie;
357    ap_module_symbol_t *modi;
358    so_server_conf *sconf;
359    int i;
360    apr_file_t *out = NULL;
361
362    if : true=0, false=0
i
f (! : true=0, false=0
!
ap_exists_config_define : enter=0, leave=0

ap_exists_config_define : include/http_core.h line=281 column=17
a
p_exists_config_define("DUMP_MODULES")) {
363        return : pass=0
r
eturn;
364    }
365
366    apr_file_open_stdout : enter=0, leave=0

apr_file_open_stdout : /usr/include/apr-1/apr_file_io.h line=332 column=27
a
pr_file_open_stdout(&out : modules/mappers/mod_so.c line=360 column=17
o
ut, p : modules/mappers/mod_so.c line=354 column=45
p
);
367
368    apr_file_printf : enter=0, leave=0

apr_file_printf : /usr/include/apr-1/apr_file_io.h line=759 column=25
a
pr_file_printf(out : modules/mappers/mod_so.c line=360 column=17
o
ut, "Loaded Modules:\n");
369
370    sconf : modules/mappers/mod_so.c line=358 column=21
s
conf = : pass=0
=
 (so_server_conf *)ap_get_module_config(s : modules/mappers/mod_so.c line=354 column=60
s
-> : enter=0, leave=0
-
>module_config : include/httpd.h line=1207 column=30
m
odule_config,
371                                                   &so_module : modules/mappers/mod_so.c line=100 column=31
s
o_module);
372    for (i : modules/mappers/mod_so.c line=359 column=9
i
 = : pass=0
=
 0; ; i : modules/mappers/mod_so.c line=359 column=9
i
++ : pass=0
+
+) {
373        modi : modules/mappers/mod_so.c line=357 column=25
m
odi = : pass=0
=
 &ap_prelinked_module_symbols : include/http_config.h line=750 column=43
a
p_prelinked_module_symbols[] : enter=0, leave=0
[
i : modules/mappers/mod_so.c line=359 column=9
i
];
374        if : true=0, false=0
i
f (modi : modules/mappers/mod_so.c line=357 column=25
m
odi-> : enter=0, leave=0
-
>name : include/http_config.h line=731 column=17
n
ame != : true=0, false=0
!
= NULL) {
375            apr_file_printf : enter=0, leave=0

apr_file_printf : /usr/include/apr-1/apr_file_io.h line=759 column=25
a
pr_file_printf(out : modules/mappers/mod_so.c line=360 column=17
o
ut, " %s (static)\n", modi : modules/mappers/mod_so.c line=357 column=25
m
odi-> : enter=0, leave=0
-
>name : include/http_config.h line=731 column=17
n
ame);
376        }
377        else {
378            break : pass=0
b
reak;
379        }
380    }
381
382    modie : modules/mappers/mod_so.c line=356 column=25
m
odie = : pass=0
=
 (ap_module_symbol_t *)sconf : modules/mappers/mod_so.c line=358 column=21
s
conf-> : enter=0, leave=0
-
>loaded_modules : modules/mappers/mod_so.c line=109 column=25
l
oaded_modules-> : enter=0, leave=0
-
>elts : /usr/include/apr-1/apr_tables.h line=62 column=11 elts;
383    for : true=0, false=0
f
or (i : modules/mappers/mod_so.c line=359 column=9
i
 = : pass=0
=
 0; i : modules/mappers/mod_so.c line=359 column=9
i
 < : true=0, false=0
<
 sconf : modules/mappers/mod_so.c line=358 column=21
s
conf-> : enter=0, leave=0
-
>loaded_modules : modules/mappers/mod_so.c line=109 column=25
l
oaded_modules-> : enter=0, leave=0
-
>nelts : /usr/include/apr-1/apr_tables.h line=58 column=9 nelts; i : modules/mappers/mod_so.c line=359 column=9
i
++ : pass=0
+
+) {
384        modi : modules/mappers/mod_so.c line=357 column=25
m
odi = : pass=0
=
 &modie : modules/mappers/mod_so.c line=356 column=25
m
odie[] : enter=0, leave=0
[
i : modules/mappers/mod_so.c line=359 column=9
i
];
385        if : true=0, false=0
i
f (modi : modules/mappers/mod_so.c line=357 column=25
m
odi-> : enter=0, leave=0
-
>name : include/http_config.h line=731 column=17
n
ame != : true=0, false=0
!
= NULL) {
386            apr_file_printf : enter=0, leave=0

apr_file_printf : /usr/include/apr-1/apr_file_io.h line=759 column=25
a
pr_file_printf(out : modules/mappers/mod_so.c line=360 column=17
o
ut, " %s (shared)\n", modi : modules/mappers/mod_so.c line=357 column=25
m
odi-> : enter=0, leave=0
-
>name : include/http_config.h line=731 column=17
n
ame);
387        }
388    }
389}
390
391#else /* not NO_DLOPEN */
392
393static const char *load_file(cmd_parms *cmd, void *dummy, const char *filename)
394{
395    ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, cmd->pool,
396                 "WARNING: LoadFile not supported on this platform");
397    return NULL;
398}
399
400static const char *load_module(cmd_parms *cmd, void *dummy,
401                               const char *modname, const char *filename)
402{
403    ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, cmd->pool,
404                 "WARNING: LoadModule not supported on this platform");
405    return NULL;
406}
407
408#endif /* NO_DLOPEN */
409
410static void register_hooks : call=1
r
egister_hooks(apr_pool_t *p)
411{
412#ifndef NO_DLOPEN
413    APR_REGISTER_OPTIONAL_FN(ap_find_loaded_module_symbol : modules/mappers/mod_so.c line=334 column=16
a
p_find_loaded_module_symbol);
414    ap_hook_test_config : enter=1, leave=1

ap_hook_test_config : modules/mappers/ line=176 column=1
a
p_hook_test_config(dump_loaded_modules : modules/mappers/mod_so.c line=354 column=13
d
ump_loaded_modules, NULL, NULL, APR_HOOK_MIDDLE);
415#endif
416}
417
418static const command_rec so_cmds[] = {
419    AP_INIT_TAKE2("LoadModule", load_module : modules/mappers/mod_so.c line=152 column=20
l
oad_module, NULL, RSRC_CONF | : pass=0
|
 EXEC_ON_READ,
420      "a module name and the name of a shared object file to load it from"),
421    AP_INIT_ITERATE("LoadFile", load_file : modules/mappers/mod_so.c line=307 column=20
l
oad_file, NULL, RSRC_CONF  | : pass=0
|
 EXEC_ON_READ,
422      "shared object file or library to load into the server at runtime"),
423    { NULL }
424};
425
426module AP_MODULE_DECLARE_DATA so_module = {
427   STANDARD20_MODULE_STUFF,
428   NULL,                 /* create per-dir config */
429   NULL,                 /* merge per-dir config */
430   so_sconf_create : modules/mappers/mod_so.c line=112 column=14
s
o_sconf_create,      /* server config */
431   NULL,                 /* merge server config */
432   so_cmds : modules/mappers/mod_so.c line=418 column=26
s
o_cmds,              /* command apr_table_t */
433   register_hooks : modules/mappers/mod_so.c line=410 column=13
r
egister_hooks        /* register hooks */
434};
435[EOF]


Generated by expcov