Using Sablotron v 0.50 with XML::Sablotron v 0.50, Sablotron will cause
a segmentation fault if you supply an odd number of parameter elements.
Parameters should be supplied in pairs (name, value), so an odd number
of supplied parameters is an error, but a fatal error with associated
message should be produced, rater that a segfault.
It took quite a while finding out that this was what was causing the
segfault which was due to an error in my Perl :-(
Below is a backtrace:
GNU gdb 19991004
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run -X
Starting program: /usr/sbin/httpd -X
Program received signal SIGSEGV, Segmentation fault.
0x402e3c33 in DStr::operator+= (this=0xbffff92c, adding=0x0) at
datastr.cpp:507
507 nadd(adding, strlen(adding));
Current language: auto; currently c++
(gdb) bt
#0 0x402e3c33 in DStr::operator+= (this=0xbffff92c, adding=0x0)
at datastr.cpp:507
#1 0x402e397d in DStr::DStr (this=0xbffff92c, chars=0x0) at
datastr.cpp:466
#2 0x402fc8d1 in Processor::useGlobalParam (this=0x85a1530,
name=0x85a2560 "index", val=0x0) at proc.cpp:1088
#3 0x402fd0d5 in SablotRunProcessor (processor_=0x85a1530,
sheetURI=0x85a2590 "stylesheet:main.xsl", inputURI=0x85a2570
"arg:/data",
resultURI=0x85cb2d8 "arg:/result", params=0x85d5d68,
arguments=0x81d5660)
at sablot.cpp:142
#4 0x402baf84 in XS_XML__Sablotron__Processor_RunProcessor ()
from
/usr/lib/perl5/site_perl/5.005/i386-linux/auto/XML/Sablotron/Sablotron.s
o
#5 0x80d7998 in Perl_pp_entersub ()
#6 0x8102e4d in Perl_runops_standard ()
#7 0x80a7ec1 in perl_call_sv ()
#8 0x8063d3b in perl_call_handler ()
#9 0x80636a6 in perl_run_stacked_handlers ()
#10 0x806228d in perl_handler ()
#11 0x807d403 in ap_invoke_handler ()
#12 0x8090c29 in process_request_internal ()
#13 0x8090c8c in ap_process_request ()
#14 0x808851e in child_main ()
#15 0x80886ac in make_child ()
#16 0x8088809 in startup_children ()
#17 0x8088e36 in standalone_main ()
#18 0x80895c3 in main ()
#19 0x400d09cb in __libc_start_main (main=0x808927c <main>, argc=2,
argv=0xbffffd34, init=0x805fe60 <_init>, fini=0x8102f5c <_fini>,
rtld_fini=0x4000ae60 <_dl_fini>, stack_end=0xbffffd2c)
at ../sysdeps/generic/libc-start.c:92
(gdb)
--
Stuart Clark
mailto:[EMAIL PROTECTED]
http://www.Jahingo.com/