I'm having some problems with this. Apache seg
faults on the call to parse...
This is the code I'm calling:
package Something::Configure;
sub new{
my $pkg = shift; my %params = @_; my $debug = (exists $params{debug} ? $params{debug} : 0 ); my $file = (exists $params{file} ? $params{file} : undef ); my $self = {};
bless $self, $pkg;
$self->{debug} = $debug; $self->{config_file}=$file; return $self;
} sub parse{
my
$self=shift;
use
XML::Simple;
my $xs = XML ::Simple->new(); my $site_config=$xs->XMLin($self->{config_file}); #####This is the line that seg faults }
And here's the stack trace
#0 0x400a109d in memmove () from
/lib/libc.so.6
#1 0x80c5ad8 in XML_GetBuffer ()
#2 0x4018f540 in parse_stream () from
/usr/local/lib/perl5/site_perl/5.6.1/i686-linux/auto/XML/Parser/Expat/Expat.so
#3 0x40192edc in
XS_XML__Parser__Expat_ParseStream () from
/usr/local/lib/perl5/site_perl/5.6.1/i686-
linux/auto/XML/Parser/Expat/Expat.so
#4 0x812205c in Perl_pp_entersub
()
#5 0x811c9e0 in Perl_runops_standard
()
#6 0x80dfaaa in perl_call_sv ()
#7 0x80dfc01 in perl_eval_sv () #8 0x8083412 in perl_do_file ()
#9 0x808344c in perl_load_startup_script
()
#10 0x807f577 in perl_cmd_require ()
#11 0x809ab2e in ap_clear_module_list
()
#12 0x809afb1 in ap_handle_command ()
#13 0x809b04d in ap_srm_command_loop
()
#14 0x809f2af in ap_exists_config_define
()
#15 0x809a4ac in ap_clear_module_list
()
#16 0x809afb1 in ap_handle_command ()
#17 0x809b04d in ap_srm_command_loop
()
#18 0x809b719 in ap_process_resource_config
()
#19 0x80a07f3 in ap_exists_config_define
()
#20 0x809a58d in ap_clear_module_list
()
#21 0x809afb1 in ap_handle_command ()
#22 0x809b04d in ap_srm_command_loop
()
#23 0x809b719 in ap_process_resource_config
()
#24 0x809c080 in ap_read_config ()
#25 0x80a722c in main ()
#26 0x40064a42 in __libc_start_main () from
/lib/libc.so.6
The Configure package works fine when I call
it regularly (from a test file on the command line)
When I try to start it under mod_perl, apache seg
faults
My guess is that it's a memory violation..
(mod_perl and expat?)
Anyone think they could help me with
this?
|
- Re: Seg fault on apache start Jaberwocky
- Re: Seg fault on apache start Stephen Clouse
- Re: Seg fault on apache start Doug MacEachern