Accéder au contenu.
Menu Sympa

fr - Re: [sympa-fr] erreur lors instanciation d'une famille

Objet : Pour les administrateurs de serveurs de listes utilisant le logiciel Sympa

Archives de la liste

Chronologique Discussions  
  • From: Olivier Salaün - CRU <adresse@cachée>
  • To: Jean-Hugues BELPOIS <adresse@cachée>
  • Cc: adresse@cachée
  • Subject: Re: [sympa-fr] erreur lors instanciation d'une famille
  • Date: Thu, 28 Jul 2005 09:41:56 +0200

Bonjour,

Nous avons pu reproduire le problème (qui semble lié à la version 2.6.16 de libxml2).

Nous avons modifié le code de sympa pour contourner la problème (utilisation de parse_file() au lieu de parse_fh()). Vous trouverez un patch ci-joint (applicable sur une version 5.0.x).

Rappel pour appliquer le patch : cd sympa-5.0 ; patch -p0 < family-segfault.diff ; make install

Jean-Hugues BELPOIS wrote:
[...]
mais quand je lance l'instanciation avec :

/home/sympa/bin/sympa.pl --debug --instantiate_family etudiants --robot listes.univ-brest.fr --input_file /home/sympa/scripts/create_listes_etudiants.xml

j'obtiens :

*** glibc detected *** free(): invalid pointer: 0x0919dc21 ***
Abandon

? src/aliaswrapper
? src/bouncequeue
? src/queue
? src/virtualwrapper
Index: src/Family.pm
===================================================================
RCS file: /sympa/sympa/src/Family.pm,v
retrieving revision 1.4.6.1
diff -c -r1.4.6.1 Family.pm
*** src/Family.pm 21 Jun 2005 13:55:12 -0000 1.4.6.1
--- src/Family.pm 28 Jul 2005 07:33:03 -0000
***************
*** 514,520 ****
#########################################
sub instantiate {
my $self = shift;
! my $xml_fh = shift;
&do_log('debug2','Family::instantiate(%s)',$self->{'name'});

# initialize vars
--- 514,520 ----
#########################################
sub instantiate {
my $self = shift;
! my $xml_file = shift;
&do_log('debug2','Family::instantiate(%s)',$self->{'name'});

# initialize vars
***************
*** 526,532 ****
my $previous_family_lists = $self->get_hash_family_lists();

## xml instantiation data
! unless ($self->_split_xml_file($xml_fh)) {
&do_log('err','Errors during the parsing of family xml file');
return undef;
}
--- 526,532 ----
my $previous_family_lists = $self->get_hash_family_lists();

## xml instantiation data
! unless ($self->_split_xml_file($xml_file)) {
&do_log('err','Errors during the parsing of family xml file');
return undef;
}
***************
*** 1154,1160 ****
#####################################################
sub _split_xml_file {
my $self = shift;
! my $xml_fh = shift;
my $root;
&do_log('debug2','Family::_split_xml_file(%s)',$self->{'name'});

--- 1154,1160 ----
#####################################################
sub _split_xml_file {
my $self = shift;
! my $xml_file = shift;
my $root;
&do_log('debug2','Family::_split_xml_file(%s)',$self->{'name'});

***************
*** 1163,1169 ****
$parser->line_numbers(1);
my $doc;

! unless ($doc = $parser->parse_fh($xml_fh)) {
&do_log('err',"Family::_split_xml_file() : failed to parse XML file");
return undef;
}
--- 1163,1169 ----
$parser->line_numbers(1);
my $doc;

! unless ($doc = $parser->parse_file($xml_file)) {
&do_log('err',"Family::_split_xml_file() : failed to parse XML file");
return undef;
}
Index: src/sympa.pl
===================================================================
RCS file: /sympa/sympa/src/sympa.pl,v
retrieving revision 1.154
diff -c -r1.154 sympa.pl
*** src/sympa.pl 11 Jan 2005 10:15:14 -0000 1.154
--- src/sympa.pl 28 Jul 2005 07:33:03 -0000
***************
*** 471,482 ****
exit 1;
}

! unless (open INFILE, $main::options{'input_file'}) {
! print STDERR $usage_string;
exit 1;
}

! unless ($family->instantiate(\*INFILE)) {
print STDERR "\nImpossible family instantiation : action stopped \n";
exit 1;
}
--- 471,482 ----
exit 1;
}

! unless (-r $main::options{'input_file'}) {
! print STDERR "Unable to read $main::options{'input_file'}) file";
exit 1;
}

! unless ($family->instantiate($main::options{'input_file'})) {
print STDERR "\nImpossible family instantiation : action stopped \n";
exit 1;
}

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature




Archives gérées par MHonArc 2.6.19+.

Haut de le page