You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by Massimo Manghi <ma...@unipr.it> on 2014/02/04 13:31:30 UTC

fixed and extended ::rivet::inspect implementation

Yesterday I committed new verstions of mod_rivet.c and rivetInspect.c
where I extended ::rivet::inspect to surrogate the behavior of 'info script'

The current status of this new module is not stable, but I'm going to
work on it tomorrow to straighten it up.

There is a problem with the implementation of ::rivet::inspect in 2.1.3
because it relies on data that are might not be defined when the command
is invoked causing the server to fail (I'm going to file a bug on this
to document it). Basically the problem might occur when
::rivet::inspect is called from outside an HTTP request processing where
pointer globals->r in general is not defined and in any case is a
dangling pointer (global->r points to the current request_rec structure,
which stores also a pointer to the server_rec structure, which in turn
points to the configuration records)

With new implementation the segmentation fault is totally deterministic
because globals->r is set to NULL just before Rivet_SendContent returns.
This pointer being NULL signals that execution is taking place outside a
request processing (server and child initialization, child process exit)
thus driving 'inspect script' to draw on different ways to determine the
script name.

I have fixed this already in my working copy choosing to simply return
an empty string (I'm open to change this behavior) when the value
required by the client is undefined and calling the core 'info script'
command when needed, but I still have to test it.

comments are welcome

-- 
-- Massimo Manghi

Dipartimento di Neuroscienze
Unità di Biofisica e Fisica Medica
via Volturno 39
43125 Parma

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org