httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <>
Subject Re: apreq 2 Status?
Date Fri, 03 Oct 2003 01:42:23 GMT
Quoting Joe Schaefer <>:

> > Cool. I have done some work on that static linking thing. I can have
> > the patch to you some time tomorrow (Sydney time), if you're
> > interested. I can't promise it looks nice, but at least it's a
> > starting point... And, of course, I get mod_apreq statically linked
> > into Apache 2 - hurray! 
> Great- that'll be a nice feature (there's no rush, though-  I'm shooting
> for a dev release happening about two weeks from today).  I'm also
> curious to see if the current build system actually works on OS X.  If
> it doesn't, having an alternate static solution will come in handy.
> [...]

Don't have any OS X machines around here, so can't contribute there. I'm
actually just ironing out some last minute wrinkles in regards to this.

> > I'm not sure if the fix for that NULL problem that I mentioned is
> > going to be included... Do you want me to have more look into the code
> > to see where exactly we need such a test and ultimately submit a patch?
> It wouldn't hurt :-).  I am working locally with a patched apreq.h, but
> I haven't sorted out 
>   1) what macros I want defined/undefined to enable the assert(P!=NULL)
>      expression,
>   2) how to incorporate those choices into our configure options
>      ("off" for normal builds, "on" for "maintainer-mode" builds).
> I'm leaning towards something like
> #ifdef DEBUG
> #include <assert.h>
> ... use assert version...
> else
> ...use normal version...
> #endif
> but I'm also worried about whether or not third-party developers would
> prefer it if we used APREQ_DEBUG instead.  However, we already define
> that macro for our logging API.  We could change those to use APLOG_
> instead (after all, the logging macros were cribbed directly from
> httpd), which might be a good idea anyway...   thus my malaise over 
> the whole blasted issue %^<.
> [...]

The problem that I see with this approach is that it is only good for debugging.
In other words, in a real life runtime situation, this won't give us protection
against segfaults.

So, I'll try to identify instances of the code that call this macro and where P
that's being pushed in can be NULL. For instance, this is the case with some of
the cookie stuff. The return value from apr_table_get() is a legitimate NULL
value, but that's never checked and then the code segfaults. Once all such
things are indetified, we can have a conditional before calling the macro.

In cases where we know that P is going to be valid, we don't do any checking,
therefore saving a few instructions on every use of the macro.

> > Is the page done through Anakia or XSLT? I should be familiar with
> > both. Where do the pages live - I keep forgeting the URL's for the
> > Apache sites themselves. 
> I'm pretty sure it's Anakia.  The cvs repository is "httpd-site":
> the raw docs are in the xdocs/apreq directory, and the generated 
> ones wind up in docs/apreq.  Typing "ant" in the base directory
> generates /docs from /xdocs.

Found the documents in xdocs. Looks like straight HTML, so there are no
transformations performed on it at all (Ant will simply copy such files, as you
can see from build.xml). All you need to do is edit it and then run the rebuild.
You probably just have to run './' from the httpd-site directory to do
that after you've changed the file in xdocs directory.


View raw message